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

/**
 * MCC Homepage Marketing Drawer — Stylesheet
 * Checkpoint 5 — Phase 2B.1: Infrastructure only. No production artwork.
 *
 * @package MarketingControlCenter
 * @since   1.3.0
 */

/* ── Trigger Tab ──────────────────────────────────────────────────────────── */

.mcc-drawer-trigger {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%) rotate(0deg);
    z-index: 8900;

    display: flex;
    align-items: center;
    justify-content: center;

    /* Vertical pill rotated to sit flush on right edge */
    writing-mode: vertical-rl;
    text-orientation: mixed;

    padding: 14px 10px;
    background: #2c2c2c;
    color: #f4ecd8;
    border: none;
    border-radius: 6px 0 0 6px;
    cursor: pointer;

    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;

    box-shadow: -2px 0 8px rgba(0,0,0,0.25);
    transition: background 0.2s ease;

    /* Offset for admin bar (logged-in users) */
}

body.admin-bar .mcc-drawer-trigger {
    top: calc(50% + 16px);
}

.mcc-drawer-trigger:hover,
.mcc-drawer-trigger:focus {
    background: #4a3728;
    outline: 2px solid #f4ecd8;
    outline-offset: 2px;
}

.mcc-drawer-trigger__label {
    display: block;
}

/* ── Overlay ──────────────────────────────────────────────────────────────── */

.mcc-drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 8910;
    background: rgba(0, 0, 0, 0.45);

    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}

.mcc-drawer-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

/* ── Drawer Panel ─────────────────────────────────────────────────────────── */

.mcc-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 8920;

    width: 320px;
    max-width: 92vw;

    /* Warm parchment aged-paper background gradient with subtle edge shadow */
    background: #E4CFA5;
    box-shadow: 
        -4px 0 24px rgba(0,0,0,0.22),
        inset 1px 0 0 rgba(255,255,255,0.45);

    /* Slide-in from right */
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Accessibility: hidden until open */
    visibility: hidden;
}

.mcc-drawer.is-open {
    transform: translateX(0);
    visibility: visible;
}

/* Admin bar offset */
body.admin-bar .mcc-drawer {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .mcc-drawer {
        top: 46px;
    }
}

/* ── Drawer Inner ─────────────────────────────────────────────────────────── */

.mcc-drawer__inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* ── Drawer Header ────────────────────────────────────────────────────────── */

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

    /*
     * ── Dark Stained Walnut — Pass 5 ──────────────────────────────────────
     *
     * Four layers, back-to-front:
     *
     *  4 (bottom) — Base walnut linear gradient. Establishes the dark warm-
     *               brown colour range of aged oiled walnut.
     *
     *  3          — Heartwood radial glow. Warm amber rising from below,
     *               imitating the reddish core of walnut lit by warm light.
     *
     *  2          — Lacquer sheen. Soft off-white radial at top-left edge,
     *               simulating an oiled/varnished surface finish reflection.
     *
     *  1 (top)    — SVG feTurbulence grain. Procedurally generated organic
     *               noise at baseFrequency 0.012 x 0.38 produces genuine
     *               elongated horizontal grain lines that read as real wood.
     *               This is what CSS gradients alone cannot achieve.
     */
    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;
}

.mcc-drawer__title {
    font-family: 'Cinzel Decorative', 'Cinzel', Georgia, serif;
    font-size: 19px;
    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);
}

.mcc-drawer__close {
    background: transparent;
    border: none;
    color: rgba(200, 158, 72, 0.55);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 5px 7px;
    border-radius: 3px;
    transition: background 0.15s ease, color 0.15s ease;
    flex-shrink: 0;
}

.mcc-drawer__close:hover,
.mcc-drawer__close:focus {
    background: rgba(255, 255, 255, 0.09);
    color: #d4a84b;
    outline: 1px solid rgba(200, 158, 72, 0.40);
    outline-offset: 2px;
}
/* ── Drawer Body ──────────────────────────────────────────────────────────── */

.mcc-drawer__body {
    flex: 1;
    overflow-y: auto;
    padding: 24px 20px;
}

/* ── Phase 2B.1 Placeholder ───────────────────────────────────────────────── */

.mcc-drawer__placeholder {
    font-size: 13px;
    color: #888;
    font-style: italic;
    text-align: center;
    margin: 0;
    padding: 20px 0;
    border: 1px dashed #b08040;
    border-radius: 4px;
}

/* ── Reduced Motion ───────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .mcc-drawer,
    .mcc-drawer-overlay {
        transition: none;
    }

    .mcc-drawer {
        transform: translateX(0);
        visibility: hidden;
    }

    .mcc-drawer.is-open {
        visibility: visible;
    }
}

/* ── Mobile ───────────────────────────────────────────────────────────────── */

@media screen and (max-width: 480px) {
    .mcc-drawer {
        width: 100vw;
        max-width: 100vw;
    }
}

/* ── Presentation Layer: Compact Section & Items ────────────────────────── */

.mcc-section {
    margin-bottom: 32px;
}

.mcc-section + .mcc-section {
    margin-top: 4px;
}

body aside#mcc-homepage-drawer h3.mcc-section__heading, .mcc-section__heading {
    font-family: 'Cinzel', 'Palatino Linotype', Georgia, serif;
    font-size: 15px;
    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-section:first-child body aside#mcc-homepage-drawer h3.mcc-section__heading, .mcc-section__heading {
    margin-top: 0;
}

.mcc-section__items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

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

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

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

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

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

.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-item__action:hover {
    background: #2c2c2c;
    color: #f4ecd8;
}