/* CricGuides Article Sidebar — v1.0.4 */

/* ═══════════════════════════════════════
   TWO-COLUMN LAYOUT
═══════════════════════════════════════ */
.cgsb-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    align-items: start;
    width: 100%;
}

.cgsb-main  { min-width: 0; }
.cgsb-sidebar { min-width: 0; width: 300px; }

/* Sticky sidebar — NO max-height, NO overflow hidden */
.cgsb-sticky {
    position: sticky;
    top: 80px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 40px;
}

@media (max-width: 1080px) {
    .cgsb-layout { grid-template-columns: 1fr; }
    .cgsb-sidebar { display: none; }
}

/* ═══════════════════════════════════════
   WIDGET BASE — no overflow:hidden
═══════════════════════════════════════ */
.cgsb-widget {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    width: 100%;
    box-sizing: border-box;
}

.cgsb-widget__title {
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: .09em !important;
    color: #9ca3af !important;
    margin: 0 0 14px !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
    box-shadow: none !important;
    line-height: 1.4 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

/* ═══════════════════════════════════════
   AD SLOTS
═══════════════════════════════════════ */
.cgsb-widget--ad {
    background: #fafafa;
    border-radius: 12px;
}
.cgsb-ad-label {
    font-size: 9px;
    color: #d1d5db;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: 8px 0 2px;
}
.cgsb-ad-inner { padding: 8px; text-align: center; }
.cgsb-ad-inner img,
.cgsb-ad-inner iframe { max-width: 100%; }

/* ═══════════════════════════════════════
   RELATED POSTS
═══════════════════════════════════════ */
.cgsb-widget--related { padding: 16px 16px 12px; }
.cgsb-related-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.cgsb-related-item {
    border-bottom: 1px solid #f3f4f6;
    padding: 10px 0;
}
.cgsb-related-item:last-child { border-bottom: none; padding-bottom: 0; }
.cgsb-related-item:first-child { padding-top: 0; }
.cgsb-related-link {
    display: flex;
    gap: 10px;
    text-decoration: none;
    align-items: flex-start;
}
.cgsb-related-link:hover .cgsb-related-title { color: #1e4d32; }
.cgsb-related-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    background: #f3f4f6;
    display: block;
}
.cgsb-related-img--placeholder {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    background: #f0fdf4;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.cgsb-related-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
}
.cgsb-related-cat {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #1e4d32;
}
.cgsb-related-title {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    line-height: 1.4;
    transition: color .15s;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ═══════════════════════════════════════
   PRODUCT WIDGET
═══════════════════════════════════════ */
.cgsb-widget--product {
    padding: 16px;
    background: linear-gradient(135deg, #fffbf0, #fff8e6);
    border-color: #fde68a;
    border-radius: 12px;
}
.cgsb-widget__title--product { color: #d97706 !important; }
.cgsb-editor-badge { color: #f59e0b; }
.cgsb-product-img {
    width: 100%;
    max-height: 140px;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
    padding: 8px;
    border: 1px solid #fde68a;
    margin-bottom: 10px;
    display: block;
    box-sizing: border-box;
}
.cgsb-product-name {
    font-size: 13px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
    line-height: 1.4;
}
.cgsb-product-price {
    font-size: 14px;
    font-weight: 800;
    color: #1e4d32;
    margin-bottom: 6px;
}
.cgsb-product-desc {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.5;
    margin: 0 0 12px;
}
.cgsb-product-btn {
    display: block;
    background: #f59e0b;
    color: #fff !important;
    text-align: center;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none !important;
    transition: background .15s, transform .15s;
    box-sizing: border-box;
    width: 100%;
}
.cgsb-product-btn:hover {
    background: #d97706;
    transform: translateY(-1px);
    color: #fff !important;
}
.cgsb-product-disc {
    font-size: 10px;
    color: #9ca3af;
    text-align: center;
    margin: 8px 0 0;
    line-height: 1.4;
}

/* ═══════════════════════════════════════
   NEWSLETTER
═══════════════════════════════════════ */
.cgsb-widget--newsletter {
    padding: 20px 16px;
    background: linear-gradient(135deg, #1e4d32, #276043);
    border-color: #1e4d32;
    border-radius: 12px;
    color: #fff;
    text-align: center;
    box-sizing: border-box;
}
.cgsb-newsletter-icon {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 18px;
    line-height: 1;
}
.cgsb-widget--newsletter .cgsb-widget__title {
    color: rgba(255,255,255,.65) !important;
    margin-bottom: 6px !important;
}
.cgsb-newsletter-heading {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 6px;
    line-height: 1.3;
}
.cgsb-newsletter-sub {
    font-size: 12px;
    color: rgba(255,255,255,.75);
    line-height: 1.55;
    margin: 0 0 14px;
}
.cgsb-newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}
.cgsb-newsletter-input {
    padding: 10px 12px;
    border-radius: 7px;
    border: none;
    font-size: 13px;
    outline: none;
    width: 100%;
    font-family: inherit;
    box-sizing: border-box;
    color: #111827;
}
.cgsb-newsletter-btn {
    background: #f59e0b;
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
}
.cgsb-newsletter-btn:hover { background: #d97706; }
.cgsb-newsletter-privacy {
    font-size: 10px;
    color: rgba(255,255,255,.45);
    margin: 8px 0 0;
}
.cgsb-newsletter-success {
    font-size: 14px;
    color: #fff;
    font-weight: 600;
    padding: 10px 0;
    text-align: center;
}
.cgsb-newsletter-embed { text-align: left; }

/* ═══════════════════════════════════════
   POPULAR POSTS
═══════════════════════════════════════ */
.cgsb-widget--popular { padding: 16px 16px 12px; }
.cgsb-popular-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.cgsb-popular-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 9px 0;
    border-bottom: 1px solid #f3f4f6;
}
.cgsb-popular-item:last-child { border-bottom: none; padding-bottom: 0; }
.cgsb-popular-item:first-child { padding-top: 0; }
.cgsb-popular-num {
    font-size: 18px;
    font-weight: 800;
    color: #e5e7eb;
    line-height: 1.2;
    min-width: 22px;
    flex-shrink: 0;
    font-family: Georgia, serif;
}
.cgsb-popular-item:first-child .cgsb-popular-num { color: #f59e0b; }
.cgsb-popular-item:nth-child(2) .cgsb-popular-num { color: #9ca3af; }
.cgsb-popular-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}
.cgsb-popular-cat {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #1e4d32;
}
.cgsb-popular-title {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    text-decoration: none;
    line-height: 1.4;
    transition: color .15s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cgsb-popular-title:hover { color: #1e4d32; }

/* ═══════════════════════════════════════
   SOCIAL SHARE
═══════════════════════════════════════ */
.cgsb-widget--social { padding: 16px; }
.cgsb-social-btns {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.cgsb-social-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    font-family: inherit;
    transition: transform .15s;
    width: 100%;
    box-sizing: border-box;
}
.cgsb-social-btn:hover { transform: translateX(3px); }
.cgsb-social-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.cgsb-social-btn--whatsapp { background: #dcfce7; color: #166534; }
.cgsb-social-btn--whatsapp:hover { background: #bbf7d0; }
.cgsb-social-btn--facebook { background: #dbeafe; color: #1d4ed8; }
.cgsb-social-btn--facebook:hover { background: #bfdbfe; }
.cgsb-social-btn--twitter  { background: #f3f4f6; color: #111827; }
.cgsb-social-btn--twitter:hover  { background: #e5e7eb; }
.cgsb-social-btn--copy { background: #f9fafb; color: #6b7280; text-align: left; }
.cgsb-social-btn--copy:hover { background: #f3f4f6; color: #111827; }
.cgsb-copy-success { color: #166534 !important; background: #dcfce7 !important; }

/* ═══════════════════════════════════════
   ABOUT BOX
═══════════════════════════════════════ */
.cgsb-widget--about { padding: 16px; text-align: center; }
.cgsb-about-logo { max-width: 100px; height: auto; margin: 0 auto 10px; display: block; }
.cgsb-about-icon { font-size: 28px; margin-bottom: 8px; }
.cgsb-about-title { font-size: 14px; font-weight: 700; color: #111827; margin: 0 0 6px; }
.cgsb-about-desc { font-size: 12px; color: #6b7280; line-height: 1.6; margin: 0 0 12px; }
.cgsb-about-links { display: flex; flex-direction: column; gap: 4px; }
.cgsb-about-link { font-size: 12px; color: #1e4d32; text-decoration: none; padding: 3px 0; }
.cgsb-about-link:hover { text-decoration: underline; }
