/* ============================================================
   COOKIE BANNER — cookie-banner.css
   GDPR / Consent Mode v2 compliant
   ============================================================ */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 5000;
    background: var(--primary-dark);
    box-shadow: 0 -4px 30px rgba(26,22,40,0.2);
    font-size: 0.9rem;
}

.cookie-banner-inner {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1.4rem var(--space-lg);
    flex-wrap: wrap;
}

.cookie-banner-text { flex: 1; min-width: 260px; }
.cookie-banner-text p { color: rgba(255,255,255,0.85); margin: 0; line-height: 1.5; }
.cookie-banner-text p:first-child { color: var(--white); margin-bottom: 0.3rem; }
.cookie-banner-text a { color: var(--secondary); }
.cookie-banner-text a:hover { color: var(--white); }

.cookie-banner-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    align-items: center;
    flex-shrink: 0;
}

/* Banner buttons */
.btn-cookie-reject {
    background: transparent;
    border: 1.5px solid rgba(255,255,255,0.45);
    color: rgba(255,255,255,0.85);
    padding: 0.55rem 1.1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    font-family: var(--font-body);
    transition: all 0.2s;
}
.btn-cookie-reject:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--white);
    color: var(--white);
}

.btn-cookie-customize {
    background: transparent;
    border: 1.5px solid var(--secondary);
    color: var(--secondary);
    padding: 0.55rem 1.1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    font-family: var(--font-body);
    transition: all 0.2s;
}
.btn-cookie-customize:hover {
    background: var(--secondary);
    color: var(--primary-dark);
}

.btn-cookie-accept-all {
    background: var(--secondary);
    border: 1.5px solid var(--secondary);
    color: var(--primary-dark);
    padding: 0.55rem 1.2rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    font-family: var(--font-body);
    transition: all 0.2s;
}
.btn-cookie-accept-all:hover {
    background: var(--white);
    border-color: var(--white);
    color: var(--primary-dark);
}

/* Focus states */
.btn-cookie-reject:focus-visible,
.btn-cookie-customize:focus-visible,
.btn-cookie-accept-all:focus-visible {
    outline: 3px solid var(--secondary);
    outline-offset: 2px;
}

/* Preferences Panel */
.cookie-preferences-panel {
    background: var(--dark);
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 1.5rem 0;
}
.cookie-preferences-panel h3 {
    font-size: 1rem;
    font-family: var(--font-body);
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 1.2rem;
    letter-spacing: 0.05em;
}

.cookie-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.cookie-toggle-row:last-of-type { border-bottom: none; }

.cookie-toggle-info { flex: 1; }
.cookie-toggle-info strong { display: block; color: var(--white); font-size: 0.9rem; margin-bottom: 0.2rem; }
.cookie-toggle-info span  { color: rgba(255,255,255,0.6); font-size: 0.82rem; line-height: 1.4; }

.cookie-toggle-control { flex-shrink: 0; }

/* Always on badge */
.toggle-always-on {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--secondary);
    background: rgba(202,187,252,0.15);
    padding: 0.25rem 0.7rem;
    border-radius: 50px;
}

/* Toggle switch */
.toggle-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}
.toggle-switch input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle-slider {
    display: inline-block;
    width: 44px;
    height: 24px;
    background: rgba(255,255,255,0.2);
    border-radius: 50px;
    position: relative;
    transition: background 0.2s;
}
.toggle-slider::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: var(--white);
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.toggle-switch input:checked + .toggle-slider {
    background: var(--secondary);
}
.toggle-switch input:checked + .toggle-slider::after {
    transform: translateX(20px);
}
.toggle-switch input:focus-visible + .toggle-slider {
    outline: 3px solid var(--secondary);
    outline-offset: 2px;
}

.cookie-preferences-actions {
    padding-top: 1.2rem;
}

/* Responsive */
@media (max-width: 767px) {
    .cookie-banner-inner { flex-direction: column; align-items: flex-start; }
    .cookie-banner-actions { width: 100%; flex-direction: column; }
    .btn-cookie-reject,
    .btn-cookie-customize,
    .btn-cookie-accept-all { width: 100%; text-align: center; }
    .cookie-toggle-row { flex-direction: column; align-items: flex-start; gap: 0.6rem; }
}
