/* ==========================================================================
   CUSTOM COOKIE CONSENT BANNER — Red Star Screen Media theme
   Palette: Prussian Blue #001F47 + Key Lime Pie #AEDA1F
   ========================================================================== */

:root {
    --cc-primary: #001F47;
    --cc-primary-light: #0a3366;
    --cc-accent: #AEDA1F;
    --cc-accent-hover: #92b814;
    --cc-bg-white: #ffffff;
    --cc-bg-soft: #f2f4f7;
    --cc-text: #1a2440;
    --cc-text-muted: #6b7a99;
    --cc-border: #e2e6ef;
    --cc-shadow: 0 12px 40px rgba(0, 31, 71, 0.18);
    --cc-radius: 14px;
    --cc-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Banner (bottom bar) ---------- */
.cc-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--cc-primary);
    color: #fff;
    padding: 18px 24px;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.25);
    transform: translateY(100%);
    transition: transform var(--cc-transition);
    font-family: inherit;
}

.cc-banner.cc-visible {
    transform: translateY(0);
}

.cc-banner-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.cc-banner-text {
    flex: 1;
    min-width: 280px;
    font-size: 14px;
    line-height: 1.55;
    opacity: 0.95;
}

.cc-banner-text strong {
    color: var(--cc-accent);
    font-weight: 600;
}

.cc-banner-text a {
    color: var(--cc-accent);
    text-decoration: none;
    border-bottom: 1px dashed rgba(174, 218, 31, 0.5);
    transition: border-color var(--cc-transition);
}

.cc-banner-text a:hover {
    border-bottom-color: var(--cc-accent);
}

.cc-banner-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.cc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--cc-transition);
    font-family: inherit;
    white-space: nowrap;
    line-height: 1;
}

.cc-btn-primary {
    background: var(--cc-accent);
    color: var(--cc-primary);
    border-color: var(--cc-accent);
}

.cc-btn-primary:hover {
    background: var(--cc-accent-hover);
    border-color: var(--cc-accent-hover);
    transform: translateY(-1px);
}

.cc-btn-outline {
    background: transparent;
    color: var(--cc-accent);
    border-color: var(--cc-accent);
}

.cc-btn-outline:hover {
    background: rgba(174, 218, 31, 0.12);
}

.cc-btn-ghost {
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border-color: rgba(255, 255, 255, 0.25);
}

.cc-btn-ghost:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.6);
}

/* ---------- Modal overlay ---------- */
.cc-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 10, 30, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: all var(--cc-transition);
}

.cc-overlay.cc-visible {
    opacity: 1;
    visibility: visible;
}

/* ---------- Modal dialog ---------- */
.cc-modal {
    position: fixed;
    z-index: 10001;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.92);
    width: min(560px, calc(100vw - 48px));
    max-height: min(85vh, 640px);
    background: var(--cc-bg-white);
    border-radius: var(--cc-radius);
    box-shadow: var(--cc-shadow);
    opacity: 0;
    visibility: hidden;
    transition: all var(--cc-transition);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cc-modal.cc-visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.cc-modal-header {
    padding: 22px 28px 16px;
    border-bottom: 1px solid var(--cc-border);
    position: relative;
    flex-shrink: 0;
}

.cc-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--cc-primary);
    margin: 0;
    letter-spacing: -0.01em;
}

.cc-modal-close {
    position: absolute;
    top: 18px;
    right: 20px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--cc-text-muted);
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all var(--cc-transition);
}

.cc-modal-close:hover {
    background: var(--cc-bg-soft);
    color: var(--cc-primary);
}

.cc-modal-body {
    padding: 20px 28px;
    overflow-y: auto;
    flex: 1;
}

.cc-modal-intro {
    font-size: 14px;
    line-height: 1.65;
    color: var(--cc-text-muted);
    margin: 0 0 16px;
}

.cc-categories {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cc-cat {
    border: 1px solid var(--cc-border);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color var(--cc-transition), box-shadow var(--cc-transition);
}

.cc-cat:hover {
    border-color: #c6cfdf;
}

.cc-cat-header {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    background: var(--cc-bg-white);
    cursor: pointer;
    gap: 12px;
}

.cc-cat-toggle {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cc-text-muted);
    transition: transform var(--cc-transition);
    flex-shrink: 0;
    font-size: 12px;
}

.cc-cat.cc-open .cc-cat-toggle {
    transform: rotate(90deg);
}

.cc-cat-name {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: var(--cc-text);
}

.cc-cat-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    flex-shrink: 0;
}

.cc-cat-badge-active {
    background: var(--cc-accent-light, #f3fada);
    color: var(--cc-accent-hover);
}

.cc-cat-badge-allow {
    background: var(--cc-accent);
    color: var(--cc-primary);
}

.cc-toggle {
    position: relative;
    width: 42px;
    height: 24px;
    background: #d1d8e6;
    border-radius: 12px;
    cursor: pointer;
    transition: background var(--cc-transition);
    flex-shrink: 0;
}

.cc-toggle::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform var(--cc-transition);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.cc-toggle.cc-on {
    background: var(--cc-accent);
}

.cc-toggle.cc-on::after {
    transform: translateX(18px);
}

.cc-toggle.cc-disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.cc-cat-desc {
    padding: 0 18px;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--cc-transition), padding var(--cc-transition);
}

.cc-cat.cc-open .cc-cat-desc {
    max-height: 200px;
    padding: 0 18px 14px;
}

.cc-cat-desc p {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--cc-text-muted);
}

/* ---------- Modal footer ---------- */
.cc-modal-footer {
    padding: 16px 28px;
    border-top: 1px solid var(--cc-border);
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
    flex-shrink: 0;
    background: var(--cc-bg-white);
}

.cc-modal-footer .cc-btn {
    padding: 9px 18px;
    font-size: 13px;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    .cc-banner-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }
    .cc-banner-actions {
        justify-content: stretch;
    }
    .cc-banner-actions .cc-btn {
        flex: 1;
        padding: 11px 14px;
    }
    .cc-modal {
        width: calc(100vw - 32px);
        max-height: 90vh;
    }
    .cc-modal-header {
        padding: 18px 20px 14px;
    }
    .cc-modal-body {
        padding: 16px 20px;
    }
    .cc-modal-footer {
        padding: 14px 20px;
    }
}

/* ---------- Body lock ---------- */
body.cc-locked {
    overflow: hidden;
}

/* ---------- Hidden utility ---------- */
.cc-hidden {
    display: none !important;
}
