/* =========================================================
   COOKIE CONSENT BANNER
   ========================================================= */

/* Banner */
.ewi-cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    padding: 1rem;
    background: rgba(24, 24, 24, 0.92);
    color: #fff;
    backdrop-filter: blur(14px);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.ewi-cookie-banner[hidden] {
    display: none;
}

/* Inner grid */
.ewi-cookie-banner__inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    gap: 1rem;
    grid-template-columns: 1.6fr 1fr;
    align-items: center;
}

/* Content */
.ewi-cookie-banner__eyebrow {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.72;
    margin: 0 0 0.35rem;
}

.ewi-cookie-banner__title {
    margin: 0 0 0.45rem;
    font-size: 1.125rem;
    line-height: 1.2;
}

.ewi-cookie-banner__text {
    margin: 0;
    max-width: 65ch;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.95rem;
}

/* Actions */
.ewi-cookie-banner__actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* Preferences row */
.ewi-cookie-banner__prefs {
    grid-column: 1 / -1;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    border: 0;
    padding: 0;
    margin: 0;
}

/* Toggle labels */
.ewi-cookie-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    font-size: 0.92rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.ewi-cookie-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
}

.ewi-cookie-toggle input {
    accent-color: #4da3ff;
}

/* Buttons — base */
.ewi-cookie-btn {
    min-height: 44px;
    padding: 0.75rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    font: inherit;
    cursor: pointer;
    transition: background 0.2s ease,
                border-color 0.2s ease,
                color 0.2s ease,
                opacity 0.2s ease;
}

/* Primary button */
.ewi-cookie-btn--primary {
    background: #4da3ff;
    color: #0b0f14;
    border-color: #4da3ff;
    font-weight: 700;
}

.ewi-cookie-btn--primary:hover {
    background: #6db8ff;
    border-color: #6db8ff;
}

.ewi-cookie-btn--primary:active {
    background: #4da3ff;
    border-color: #4da3ff;
}

/* Secondary button */
.ewi-cookie-btn--secondary {
    background: transparent;
    color: #fff;
}

.ewi-cookie-btn--secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

.ewi-cookie-btn--secondary:active {
    background: rgba(255, 255, 255, 0.05);
}

/* Settings link */
.ewi-cookie-settings-link {
    appearance: none;
    background: transparent;
    border: 0;
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 0.2em;
    cursor: pointer;
    font: inherit;
    padding: 0;
    transition: opacity 0.2s ease;
}

.ewi-cookie-settings-link:hover {
    opacity: 0.75;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 760px) {
    .ewi-cookie-banner__inner {
        grid-template-columns: 1fr;
    }

    .ewi-cookie-banner__actions {
        justify-content: flex-start;
    }

    .ewi-cookie-btn {
        flex: 1 1 100%;
    }
}
/* Force white text on cookie banner in light mode (banner is always dark) */
[data-theme="light"] .ewi-cookie-banner,
[data-theme="light"] .ewi-cookie-banner__text,
[data-theme="light"] .ewi-cookie-banner *,
body.light-mode .ewi-cookie-banner,
body.light-mode .ewi-cookie-banner__text,
body.light-mode .ewi-cookie-banner * {
    color: #fff !important;
}
[data-theme="light"] .ewi-cookie-banner__text,
body.light-mode .ewi-cookie-banner__text {
    color: rgba(255,255,255,0.82) !important;
}
