/* ============================================================
   GDPR Cookie Consent Banner
   ============================================================ */
.consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    padding: 0 1rem 1rem;
    transform: translateY(100%);
    animation: consentSlideUp 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: 0.5s;
    opacity: 0;
}
@keyframes consentSlideUp {
    to { transform: translateY(0); opacity: 1; }
}
.consent-banner.consent-banner--hiding {
    animation: consentSlideDown 0.35s ease-in forwards;
}
@keyframes consentSlideDown {
    to { transform: translateY(100%); opacity: 0; }
}

.consent-banner__inner {
    max-width: 820px;
    margin: 0 auto;
    background: rgba(10, 10, 35, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(0, 240, 255, 0.18);
    border-radius: 1.25rem;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.35), 0 0 15px rgba(0, 240, 255, 0.08);
}

/* --- Text --- */
.consent-banner__text {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0 0 1rem;
}

/* --- Buttons --- */
.consent-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.consent-btn {
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: opacity 0.2s, box-shadow 0.25s;
    white-space: nowrap;
}
.consent-btn:hover { opacity: 0.88; }
.consent-btn--accept {
    background: linear-gradient(135deg, #00f0ff, #4ecca3);
    color: #0a0a23;
    box-shadow: 0 0 14px rgba(0, 240, 255, 0.25);
}
.consent-btn--accept:hover {
    box-shadow: 0 0 22px rgba(0, 240, 255, 0.4);
}
.consent-btn--essential {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.consent-btn--essential:hover {
    border-color: rgba(0, 240, 255, 0.35);
    color: #00f0ff;
}
.consent-btn--details {
    background: transparent;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: underline;
    text-underline-offset: 3px;
    padding-left: 8px;
    padding-right: 8px;
}
.consent-btn--details:hover {
    color: #00f0ff;
}

/* --- Details panel --- */
.consent-banner__details {
    display: none;
    margin-bottom: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.consent-banner__details.is-open {
    display: block;
}
.consent-category {
    margin-bottom: 0.75rem;
}
.consent-category:last-child {
    margin-bottom: 0;
}
.consent-category__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}
.consent-category__name {
    font-weight: 600;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
}
.consent-category__badge {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 8px;
    border-radius: 10px;
}
.consent-category__badge--on {
    background: rgba(78, 204, 163, 0.15);
    color: #4ecca3;
}
.consent-category__desc {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.45;
    margin: 0;
}

/* Mini toggle for analytics */
.consent-toggle {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}
.consent-toggle input { display: none; }
.consent-toggle__track {
    position: absolute;
    inset: 0;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
    transition: background 0.25s;
}
.consent-toggle__track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.25s;
}
.consent-toggle input:checked + .consent-toggle__track {
    background: #4ecca3;
}
.consent-toggle input:checked + .consent-toggle__track::after {
    transform: translateX(18px);
}

/* --- Footer link --- */
.consent-settings-link {
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: inherit;
    opacity: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.consent-settings-link:hover {
    color: #00f0ff;
}

/* --- Responsive --- */
@media (max-width: 600px) {
    .consent-banner { padding: 0 0.5rem 0.5rem; }
    .consent-banner__inner { padding: 1rem; }
    .consent-banner__actions {
        flex-direction: column;
    }
    .consent-btn { width: 100%; text-align: center; }
}

/* --- RTL --- */
[dir="rtl"] .consent-toggle__track::after {
    left: auto;
    right: 3px;
}
[dir="rtl"] .consent-toggle input:checked + .consent-toggle__track::after {
    transform: translateX(-18px);
}
