/**
 * Cookie consent — clear layout, accessible, sits above sticky bars (z-index 1060).
 * --cookie-consent-height is set by JS (vendor/cookie-consent/index) for layout sync.
 */
:root {
    --cookie-consent-height: 0px;
}

.js-cookie-consent.cookie-consent.cookie-consent-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1060;
    width: 100%;
    margin: 0;
    padding: 0 !important;
    background: transparent !important;
    color: inherit;
}

.cookie-consent-bar__surface {
    background: linear-gradient(180deg, rgba(22, 24, 31, 0.98) 0%, rgba(12, 14, 20, 0.99) 100%);
    color: #f3f4f6;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow:
        0 -8px 32px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.cookie-consent-bar__inner {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 14px 18px;
    max-width: 1140px;
    margin: 0 auto;
    padding: 14px 20px;
    min-height: 56px;
    box-sizing: border-box;
}

.cookie-consent-bar__icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    /* Explicit contrast — avoid color-mix/currentColor failing when --theme-primary is odd */
    color: #fde68a;
}

.cookie-consent-bar__icon svg {
    display: block;
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    overflow: visible;
    stroke: currentColor;
    fill: none;
    opacity: 1;
    vector-effect: non-scaling-stroke;
}

/* Beat theme/global SVG rules that can zero out strokes */
.js-cookie-consent.cookie-consent-bar .cookie-consent-bar__icon svg path {
    stroke: #fde68a !important;
    fill: none !important;
    opacity: 1 !important;
}

.cookie-consent-bar__message {
    margin: 0;
    padding: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    font-weight: 400;
    color: rgba(243, 244, 246, 0.95) !important;
    background: transparent !important;
    flex: 1;
    min-width: 0;
}

.cookie-consent-bar__agree {
    flex-shrink: 0;
    margin: 0;
    margin-inline-start: auto;
    border: 0;
    border-radius: 999px;
    padding: 12px 22px;
    min-height: 48px;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.2;
    cursor: pointer;
    white-space: nowrap;
    color: #fff !important;
    background: var(--theme-primary, #f59e0b) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
    transition:
        transform 0.15s ease,
        filter 0.15s ease,
        box-shadow 0.15s ease;
}

.cookie-consent-bar__agree:hover {
    filter: brightness(1.08);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3);
}

.cookie-consent-bar__agree:active {
    transform: scale(0.98);
}

@media (max-width: 575.98px) {
    .cookie-consent-bar__inner {
        flex-wrap: wrap;
        padding: 12px 14px;
        gap: 12px;
    }

    .cookie-consent-bar__icon {
        width: 40px;
        height: 40px;
    }

    .cookie-consent-bar__icon svg {
        width: 24px;
        height: 24px;
    }

    .cookie-consent-bar__message {
        font-size: 0.8125rem;
        flex: 1 1 calc(100% - 52px);
        order: 0;
    }

    .cookie-consent-bar__agree {
        width: 100%;
        margin-inline-start: 0;
        justify-content: center;
    }
}

/* Above fixed bottom tab bar on phones */
@media (max-width: 991.98px) {
    .js-cookie-consent.cookie-consent.cookie-consent-bar {
        bottom: calc(var(--mobile-app-nav-height, 56px) + env(safe-area-inset-bottom, 0px)) !important;
    }
}
