@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@700;800;900&family=Cinzel+Decorative:wght@700&display=swap');

/**
 * MCC Adventurer's Library Sidebar — Stylesheet
 * Visual baseline: Homepage Marketing Drawer (approved).
 * Phase 1 — Final visual refinement pass.
 * Permanent right sidebar on desktop; stacks below article on tablet/mobile.
 *
 * @package MarketingControlCenter
 * @since   1.4.0
 */

/* ── Sidebar Outer Container (Elementor flex child) ──────────────────────── */

.mcc-library-sidebar {
    flex: 0 0 320px;
    width: 320px;
    align-self: flex-start;
    position: sticky;
    top: 40px;
}

body.admin-bar .mcc-library-sidebar {
    top: calc(32px + 40px);
}

@media screen and (max-width: 782px) {
    body.admin-bar .mcc-library-sidebar {
        top: calc(46px + 20px);
    }
}

/* ── Sidebar Panel Shell ─────────────────────────────────────────────────── */

.mcc-sidebar-panel {
    width: 100%;
    border-radius: 3px;
    border: 2px solid rgba(26, 20, 16, 0.20);
    overflow: hidden;
}

/* ── Sidebar Header — Dark Stained Walnut (matches drawer exactly) ───────── */

.mcc-sidebar-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 20px 20px;
    position: relative;

    background:
        url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MDAiIGhlaWdodD0iODAiPjxmaWx0ZXIgaWQ9IndnIiB4PSIwIiB5PSIwIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIj48ZmVUdXJidWxlbmNlIHR5cGU9ImZyYWN0YWxOb2lzZSIgYmFzZUZyZXF1ZW5jeT0iMC4wMTIgMC4zOCIgbnVtT2N0YXZlcz0iNSIgc2VlZD0iMjciIHJlc3VsdD0ibm9pc2UiLz48ZmVDb2xvck1hdHJpeCB0eXBlPSJtYXRyaXgiIHZhbHVlcz0iMC4yMiAwIDAgMCAwLjA5ICAwLjExIDAgMCAwIDAuMDQgIDAuMDIgMCAwIDAgMC4wMSAgMCAwIDAgMC45MiAwIiBpbj0ibm9pc2UiIHJlc3VsdD0id29vZGNvbG9yIi8+PC9maWx0ZXI+PHJlY3Qgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsdGVyPSJ1cmwoI3dnKSIvPjwvc3ZnPg==") repeat,
        radial-gradient(
            ellipse 70% 55% at 30% 10%,
            rgba(255, 200, 110, 0.11) 0%,
            transparent 65%
        ),
        radial-gradient(
            ellipse 130% 110% at 50% 140%,
            rgba(160, 70, 8, 0.68) 0%,
            rgba(90, 35, 4, 0.38) 42%,
            transparent 65%
        ),
        linear-gradient(
            180deg,
            #321809 0%,
            #190902 22%,
            #1f0d04 52%,
            #291306 82%,
            #150701 100%
        );

    box-shadow:
        inset 0 1px 0    rgba(255, 215, 125, 0.20),
        inset 0 2px 10px rgba(0,   0,   0,   0.55),
        inset 0 -3px 0   rgba(0,   0,   0,   0.80),
        0 1px 0          rgba(178, 116, 26,  0.50),
        0 6px 20px       rgba(0,   0,   0,   0.58);

    border-bottom: 1px solid rgba(178, 116, 26, 0.55);
    color: #d4a84b;
}

/* High specificity required — beats Elementor Kit global h2 color rule */
aside.mcc-library-sidebar .mcc-sidebar-panel__title,
.mcc-sidebar-panel .mcc-sidebar-panel__title {
    font-family: 'Cinzel Decorative', 'Cinzel', Georgia, serif;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    line-height: 1.2;
    color: #d4a84b;
    text-shadow:
        0  1px 0    rgba(0,   0,   0,   0.95),
        0  2px 8px  rgba(0,   0,   0,   0.75),
        0  0  20px  rgba(210, 155, 40,  0.45);
    margin: 0;
}

/* ── Sidebar Body — Parchment (matches drawer) ───────────────────────────── */

.mcc-sidebar-panel__body {
    background: #E4CFA5;
    padding: 22px 18px;
}

/* ── Section Headings — high-specificity to beat Kit h3 rule ────────────── */

aside.mcc-library-sidebar h3.mcc-section__heading,
.mcc-sidebar-panel .mcc-section__heading {
    font-family: 'Cinzel', 'Palatino Linotype', Georgia, serif;
    font-size: 13px;
    font-weight: 900;
    font-synthesis: none;
    -webkit-font-smoothing: antialiased;
    color: #0B0B0B;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 12px 0 10px 0;
    padding-top: 2px;
    padding-bottom: 9px;
    border-bottom: 2px solid rgba(110, 70, 10, 0.85);
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}

.mcc-sidebar-panel .mcc-section:first-child .mcc-section__heading {
    margin-top: 0;
}

/* ── Section & Item layout ───────────────────────────────────────────────── */

.mcc-sidebar-panel .mcc-section {
    margin-bottom: 28px;
}

.mcc-sidebar-panel .mcc-section + .mcc-section {
    margin-top: 2px;
}

.mcc-sidebar-panel .mcc-section__items {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.mcc-sidebar-panel .mcc-item--compact {
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(130, 85, 15, 0.40);
}

.mcc-sidebar-panel .mcc-item--compact:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.mcc-sidebar-panel .mcc-item__title {
    font-size: 13px;
    font-weight: 600;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.mcc-sidebar-panel .mcc-item__link {
    color: #1A4ED8;
    text-decoration: none;
    transition: color 0.15s ease;
}

.mcc-sidebar-panel .mcc-item__link:hover {
    color: #1539A8;
    text-decoration: underline;
}

.mcc-sidebar-panel .mcc-item__excerpt {
    font-size: 12px;
    color: #555;
    line-height: 1.4;
    margin: 0 0 6px 0;
}

.mcc-sidebar-panel .mcc-item__action {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: #2c2c2c;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-decoration: none;
    padding: 3px 8px;
    border: 1px solid #2c2c2c;
    background: transparent;
    transition: all 0.2s ease;
}

.mcc-sidebar-panel .mcc-item__action:hover {
    background: #2c2c2c;
    color: #f4ecd8;
}

/* ── Root wrapper two-column overrides (desktop) ─────────────────────────── */

body.single-post .elementor .e-acc85f9-f37cfef {
    align-items: flex-start;
    gap: 28px;
}

/* ── Tablet (≤1024px): stack sidebar below article ───────────────────────── */

@media screen and (max-width: 1024px) {
    body.single-post .elementor .e-acc85f9-f37cfef {
        flex-direction: column;
        align-items: center;
        gap: 36px;
    }

    .mcc-library-sidebar {
        flex: 0 0 auto;
        width: 100%;
        max-width: 880px;
        position: static;
        top: auto;
    }
}

/* ── Mobile (≤767px) ────────────────────────────────────────────────────── */

@media screen and (max-width: 767px) {
    .mcc-library-sidebar {
        max-width: 100%;
    }

    .mcc-sidebar-panel__body {
        padding: 18px 16px;
    }
}