/* ==========================================
   ZAHRATO — Cookie-Consent Banner
   Mobile-first · DSGVO / TTDSG
   Design system: dark espresso + gold
   ========================================== */

/* ── Layer ────────────────────────────────── */
.cc {
    position: fixed;
    inset: 0;
    z-index: 5000;               /* above cart popup (3000) & lightbox (2000) */
    display: flex;
    align-items: flex-end;        /* bottom sheet on mobile */
    justify-content: center;
    visibility: hidden;
    pointer-events: none;
    font-family: var(--sans, 'Outfit', sans-serif);
}

.cc.is-open {
    visibility: visible;
    pointer-events: auto;
}

/* ── Backdrop ─────────────────────────────── */
.cc__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(13, 11, 8, 0.55);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 0.45s var(--ease, cubic-bezier(0.22, 1, 0.36, 1));
}

.cc.is-open .cc__backdrop { opacity: 1; }

/* ── Card — double-bezel architecture ─────── */
.cc__card {
    position: relative;
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    padding: clamp(2px, 0.6vw, 6px);          /* outer shell */
    background: linear-gradient(160deg, rgba(196, 165, 92, 0.22), rgba(196, 165, 92, 0.05) 40%, rgba(255, 255, 255, 0.04) 100%);
    border: 1px solid var(--border-accent, rgba(196, 165, 92, 0.25));
    border-radius: 26px 26px 0 0;
    box-shadow: 0 -18px 60px rgba(0, 0, 0, 0.6);
    transform: translateY(100%);              /* off-screen until opened */
    transition: transform 0.55s var(--ease, cubic-bezier(0.22, 1, 0.36, 1));
    will-change: transform;
}

.cc.is-open .cc__card { transform: translateY(0); }

/* Inner core */
.cc__card::before {
    content: "";
    position: absolute;
    inset: clamp(2px, 0.6vw, 6px);
    border-radius: 22px 22px 0 0;
    pointer-events: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.cc__view {
    position: relative;
    z-index: 1;
    background:
        radial-gradient(120% 90% at 85% -10%, rgba(196, 165, 92, 0.07), transparent 55%),
        linear-gradient(180deg, var(--bg-surface, #181512), var(--bg-card, #11100d));
    border-radius: 21px 21px 0 0;
    padding: clamp(22px, 6vw, 34px) clamp(20px, 6vw, 40px) clamp(18px, 5vw, 28px);
    overflow-y: auto;
    max-height: 82dvh;
}

/* ── Eyebrow & title ──────────────────────── */
.cc__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.66rem;
    font-weight: 500;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--accent, #c4a55c);
    margin-bottom: 14px;
}

.cc__eyebrow::before {
    content: "";
    width: 18px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent, #c4a55c));
}

.cc__title {
    font-family: var(--serif, 'Cormorant Garamond', Georgia, serif);
    font-size: clamp(1.7rem, 6.4vw, 2.2rem);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: 0.01em;
    color: var(--text-primary, #f0ede8);
    margin: 0 0 14px;
}

.cc__text {
    font-size: 0.9rem;
    line-height: 1.65;
    color: var(--text-secondary, #8a8580);
    margin: 0 0 22px;
    max-width: 46ch;
}

/* ── Buttons — island architecture ────────── */
.cc__actions {
    display: grid;
    gap: 10px;
    margin-bottom: 20px;
}

.cc__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 20px;
    border-radius: 999px;
    font-family: var(--sans, 'Outfit', sans-serif);
    font-size: 0.92rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.25s var(--ease, cubic-bezier(0.22, 1, 0.36, 1)),
                background 0.25s var(--ease, cubic-bezier(0.22, 1, 0.36, 1)),
                border-color 0.25s var(--ease, cubic-bezier(0.22, 1, 0.36, 1)),
                color 0.25s var(--ease, cubic-bezier(0.22, 1, 0.36, 1));
}

.cc__btn:active { transform: scale(0.98); }

/* Primary — gold */
.cc__btn--primary {
    background: linear-gradient(135deg, var(--accent-light, #d0b570), var(--accent, #c4a55c) 55%, var(--accent-dark, #a88a42));
    color: #1a1408;
    box-shadow: 0 8px 24px rgba(196, 165, 92, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.cc__btn--primary:hover { background: linear-gradient(135deg, #dcc084, var(--accent, #c4a55c) 55%, #b3913f); }
.cc__btn--primary:focus-visible { outline: 2px solid var(--accent-light, #d0b570); outline-offset: 2px; }

/* Nested icon circle inside primary button */
.cc__btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(26, 20, 8, 0.16);
    transition: transform 0.25s var(--ease, cubic-bezier(0.22, 1, 0.36, 1));
}

.cc__btn--primary:hover .cc__btn-icon { transform: translateX(2px); }

/* Ghost — outline */
.cc__btn--ghost {
    background: transparent;
    color: var(--text-primary, #f0ede8);
    border-color: var(--border-hover, rgba(255, 255, 255, 0.08));
}

.cc__btn--ghost:hover { border-color: var(--accent, #c4a55c); color: var(--accent-light, #d0b570); }
.cc__btn--ghost:focus-visible { outline: 2px solid var(--accent, #c4a55c); outline-offset: 2px; }

/* Text link button */
.cc__btn--text {
    justify-content: center;
    width: 100%;
    padding: 8px 12px;
    background: none;
    color: var(--text-secondary, #8a8580);
    font-size: 0.85rem;
}

.cc__btn--text svg { transition: transform 0.25s var(--ease, cubic-bezier(0.22, 1, 0.36, 1)); }
.cc__btn--text:hover { color: var(--accent-light, #d0b570); }
.cc__btn--text:hover svg { transform: translateX(3px); }

/* ── Footer link ──────────────────────────── */
.cc__foot {
    font-size: 0.78rem;
    color: var(--text-muted, #5c5854);
    margin: 0;
    text-align: center;
}

.cc__link {
    color: var(--text-secondary, #8a8580);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(196, 165, 92, 0.4);
    transition: color 0.2s var(--ease, cubic-bezier(0.22, 1, 0.36, 1));
}

.cc__link:hover { color: var(--accent, #c4a55c); }

/* ── Back button (settings) ───────────────── */
.cc__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0 14px;
    background: none;
    border: none;
    font-family: var(--sans, 'Outfit', sans-serif);
    font-size: 0.8rem;
    color: var(--text-secondary, #8a8580);
    cursor: pointer;
    transition: color 0.2s var(--ease, cubic-bezier(0.22, 1, 0.36, 1));
}

.cc__back:hover { color: var(--accent-light, #d0b570); }
.cc__back:focus-visible { outline: 2px solid var(--accent, #c4a55c); outline-offset: 2px; border-radius: 6px; }

/* ── Option rows ──────────────────────────── */
.cc__options {
    display: grid;
    gap: 12px;
    margin-bottom: 22px;
}

.cc__option {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 15px 16px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border, rgba(255, 255, 255, 0.04));
    border-radius: 14px;
    transition: border-color 0.25s var(--ease, cubic-bezier(0.22, 1, 0.36, 1));
}

.cc__option:hover { border-color: var(--border-hover, rgba(255, 255, 255, 0.08)); }
.cc__option--locked { align-items: center; }

.cc__option-title {
    font-family: var(--serif, 'Cormorant Garamond', Georgia, serif);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary, #f0ede8);
    margin: 0 0 3px;
}

.cc__option-desc {
    font-size: 0.78rem;
    line-height: 1.55;
    color: var(--text-muted, #5c5854);
    margin: 0;
}

.cc__badge {
    flex-shrink: 0;
    margin-left: auto;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--border-accent, rgba(196, 165, 92, 0.25));
    color: var(--accent, #c4a55c);
    font-size: 0.66rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    background: rgba(196, 165, 92, 0.06);
}

/* ── Gold toggle switch ───────────────────── */
.cc__switch {
    position: relative;
    flex-shrink: 0;
    width: 44px;
    height: 25px;
    margin-top: 1px;
    cursor: pointer;
}

.cc__switch input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}

.cc__switch-track {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid var(--border-hover, rgba(255, 255, 255, 0.08));
    transition: background 0.3s var(--ease, cubic-bezier(0.22, 1, 0.36, 1)),
                border-color 0.3s var(--ease, cubic-bezier(0.22, 1, 0.36, 1)),
                box-shadow 0.3s var(--ease, cubic-bezier(0.22, 1, 0.36, 1));
}

.cc__switch-track::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    background: #f0ede8;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    transition: transform 0.32s var(--ease-spring, cubic-bezier(0.34, 1.56, 0.64, 1));
}

.cc__switch input:checked + .cc__switch-track {
    background: linear-gradient(135deg, var(--accent-light, #d0b570), var(--accent-dark, #a88a42));
    border-color: transparent;
    box-shadow: 0 2px 12px rgba(196, 165, 92, 0.35);
}

.cc__switch input:checked + .cc__switch-track::after {
    transform: translateX(19px);
    background: #1a1408;
}

.cc__switch input:focus-visible + .cc__switch-track {
    outline: 2px solid var(--accent, #c4a55c);
    outline-offset: 2px;
}

/* ── Persistent trigger (withdraw consent) ── */
.cc__trigger {
    position: fixed;
    left: 14px;
    bottom: 14px;
    z-index: 2500;               /* below cart popup (3000) */
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 15px;
    border-radius: 999px;
    background: rgba(24, 21, 18, 0.85);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-accent, rgba(196, 165, 92, 0.25));
    color: var(--text-secondary, #8a8580);
    font-family: var(--sans, 'Outfit', sans-serif);
    font-size: 0.75rem;
    letter-spacing: 0.03em;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
    transition: color 0.25s var(--ease, cubic-bezier(0.22, 1, 0.36, 1)),
                border-color 0.25s var(--ease, cubic-bezier(0.22, 1, 0.36, 1)),
                transform 0.25s var(--ease, cubic-bezier(0.22, 1, 0.36, 1));
}

.cc__trigger:hover { color: var(--accent-light, #d0b570); border-color: var(--accent, #c4a55c); transform: translateY(-2px); }
.cc__trigger:focus-visible { outline: 2px solid var(--accent, #c4a55c); outline-offset: 2px; }
.cc__trigger:active { transform: translateY(0) scale(0.97); }

/* ── Desktop: floating card, not full modal ── */
@media (min-width: 768px) {
    .cc {
        align-items: flex-end;
        padding: 0 24px 24px;
        background: transparent;
    }

    .cc__backdrop {
        background: rgba(13, 11, 8, 0.4);
    }

    .cc__card {
        border-radius: 26px;
        transform: translateY(24px) scale(0.985);
        opacity: 0;
        transition: transform 0.55s var(--ease, cubic-bezier(0.22, 1, 0.36, 1)),
                    opacity 0.45s var(--ease, cubic-bezier(0.22, 1, 0.36, 1));
    }

    .cc__card::before { border-radius: 22px; }

    .cc__view {
        border-radius: 21px;
        max-height: 72dvh;
    }

    .cc.is-open .cc__card {
        transform: translateY(0) scale(1);
        opacity: 1;
    }

    .cc__actions {
        grid-template-columns: 1fr 1fr;
        grid-template-areas: "primary primary" "ghost text";
    }

    .cc__btn--primary { grid-area: primary; }
    .cc__btn--ghost   { grid-area: ghost; }
    .cc__btn--text    { grid-area: text; }
}

/* ── Reduced motion ───────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .cc__card,
    .cc__backdrop,
    .cc__btn,
    .cc__switch-track,
    .cc__switch-track::after {
        transition: none;
    }
}
