/* ── Cymes Cookie Consent – Stylesheet ──────────────────────────────────────
   Banner + Modal + Floating prefs button
   Uses CSS custom properties so it adapts to the public site's brand colours.
   Override --cc-* variables in your stylesheet to match your design.
   ─────────────────────────────────────────────────────────────────────────── */

:root {
    --cc-accent: #00FFCC;
    --cc-accent-h: rgba(0, 255, 204, 0.4);
    --cc-bg: #1e1e1e;
    --cc-surface: #2a2a2a;
    --cc-border: rgba(255, 255, 255, .1);
    --cc-text: #f0e8ea;
    --cc-text-muted: rgba(240, 232, 234, .55);
    --cc-radius: 12px;
    --cc-shadow: 0 8px 40px rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .3);
    --cc-transition: .25s cubic-bezier(.4, 0, .2, 1);
    --cc-z-banner: 9000;
    --cc-z-overlay: 9100;
    --cc-z-prefs: 8500;
    --cc-font: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ── Banner ────────────────────────────────────────────────────────────────── */
#cc-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: var(--cc-z-banner);
    background: var(--cc-bg);
    border-top: 1px solid var(--cc-border);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, .35);
    font-family: var(--cc-font);
    transform: translateY(110%);
    transition: transform var(--cc-transition);
}

#cc-banner.cc-visible {
    transform: translateY(0);
}

.cc-banner-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    max-width: 1100px;
    margin: 0 auto;
    padding: 18px 24px;
}

.cc-banner-text {
    flex: 1;
    min-width: 240px;
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--cc-text-muted);
    margin: 0;
}

.cc-banner-text .cc-link,
.cc-link {
    color: var(--cc-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cc-banner-text .cc-link:hover {
    color: var(--cc-accent-h);
}

.cc-banner-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.cc-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    font-family: var(--cc-font);
    font-size: 13px;
    font-weight: 600;
    border: none;
    border-radius: 0px;
    cursor: pointer;
    transition: all .15s ease;
    white-space: nowrap;
    line-height: 1;
}

.cc-btn-primary {
    background: linear-gradient(135deg, var(--cc-accent) 0%, var(--cc-accent-h) 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 255, 204, 0.4);
}

.cc-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 255, 204, 0.4);
}

.cc-btn-secondary {
    background: rgba(255, 255, 255, .08);
    color: var(--cc-text);
    border: 1px solid var(--cc-border);
}

.cc-btn-secondary:hover {
    background: rgba(255, 255, 255, .14);
}

.cc-btn-ghost {
    background: transparent;
    color: var(--cc-text-muted);
    padding: 9px 10px;
}

.cc-btn-ghost:hover {
    color: var(--cc-text);
    background: rgba(255, 255, 255, .06);
    border-radius: 8px;
}

/* ── Modal overlay ───────────────────────────────────────────────────────── */
#cc-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--cc-z-overlay);
    background: rgba(0, 0, 0, .65);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--cc-transition);
}

#cc-overlay.cc-visible {
    opacity: 1;
    pointer-events: auto;
}

#cc-modal {
    background: var(--cc-bg);
    border: 1px solid var(--cc-border);
    border-radius: var(--cc-radius);
    box-shadow: var(--cc-shadow);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    font-family: var(--cc-font);
    outline: none;
    transform: scale(.95) translateY(12px);
    transition: transform var(--cc-transition);
}

#cc-overlay.cc-visible #cc-modal {
    transform: scale(1) translateY(0);
}

/* Modal header */
.cc-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 22px 16px;
    border-bottom: 1px solid var(--cc-border);
}

.cc-modal-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--cc-text);
    margin: 0;
}

.cc-close {
    background: transparent;
    border: none;
    color: var(--cc-text-muted);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    transition: all .15s;
}

.cc-close:hover {
    background: rgba(255, 255, 255, .08);
    color: var(--cc-text);
}

/* Modal body */
.cc-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .15) transparent;
}

/* Cookie category row */
.cc-category {
    padding: 16px 22px;
    border-bottom: 1px solid var(--cc-border);
    transition: background .12s;
}

.cc-category:last-child {
    border-bottom: none;
}

.cc-category:hover {
    background: rgba(255, 255, 255, .02);
}

.cc-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cc-category-label {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--cc-text);
    margin-bottom: 3px;
}

.cc-category-desc {
    font-size: 12px;
    color: var(--cc-text-muted);
    line-height: 1.5;
}

.cc-always-on {
    font-size: 11px;
    font-weight: 700;
    color: #4ade80;
    background: rgba(74, 222, 128, .12);
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Toggle switch */
.cc-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    cursor: pointer;
}

.cc-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.cc-slider {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, .15);
    border-radius: 24px;
    transition: background var(--cc-transition);
}

.cc-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform var(--cc-transition);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .4);
}

.cc-toggle input:checked+.cc-slider {
    background: linear-gradient(135deg, var(--cc-accent), var(--cc-accent-h));
}

.cc-toggle input:checked+.cc-slider::before {
    transform: translateX(20px);
}

.cc-toggle input:focus-visible+.cc-slider {
    outline: 2px solid var(--cc-accent);
    outline-offset: 2px;
}

/* Modal footer */
.cc-modal-footer {
    display: flex;
    gap: 10px;
    padding: 16px 22px;
    border-top: 1px solid var(--cc-border);
    flex-wrap: wrap;
}

.cc-modal-footer .cc-btn {
    flex: 1;
    justify-content: center;
}

/* ── Floating preferences button ─────────────────────────────────────────── */
#cc-prefs-btn {
    position: fixed;
    bottom: 18px;
    left: 18px;
    z-index: var(--cc-z-prefs);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--cc-border);
    background: var(--cc-surface);
    color: var(--cc-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .35);
    transition: all .18s ease;
    font-family: var(--cc-font);
}

#cc-prefs-btn:hover {
    background: var(--cc-accent);
    color: #fff;
    transform: scale(1.1);
    border-color: transparent;
    box-shadow: 0 4px 18px rgba(0, 255, 204, 0.4);
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 540px) {
    .cc-banner-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .cc-banner-buttons {
        flex-direction: column;
    }

    .cc-btn {
        text-align: center;
        justify-content: center;
        width: 100%;
    }

    #cc-modal {
        max-height: 100vh;
        border-radius: var(--cc-radius) var(--cc-radius) 0 0;
    }

    #cc-overlay {
        align-items: flex-end;
        padding: 0;
    }
}