:root {
    --cookie-consent-z: 1094;
}

.cookie-consent-shell {
    position: fixed;
    left: 50%;
    bottom: max(8px, env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    width: min(720px, calc(100vw - 16px));
    z-index: var(--cookie-consent-z);
}

.cookie-consent-shell.d-none {
    display: none !important;
}

.cookie-consent-card {
    color: #ffffff;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background:
        radial-gradient(circle at top left, rgba(125, 211, 252, 0.2), transparent 34%),
        radial-gradient(circle at bottom right, rgba(250, 204, 21, 0.18), transparent 32%),
        linear-gradient(135deg, #0f172a 0%, #1d4ed8 58%, #2563eb 100%);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.26);
    overflow: hidden;
}

.cookie-consent-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.7rem;
    padding: 0.8rem 0.9rem;
}

.cookie-consent-copy {
    flex: 1 1 320px;
}

.cookie-consent-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.4rem;
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cookie-consent-title {
    margin: 0 0 0.3rem;
    color: #ffffff;
    font-size: clamp(0.95rem, 1.6vw, 1.2rem);
    line-height: 1.2;
}

.cookie-consent-text {
    margin: 0;
    max-width: 50ch;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.84rem;
    line-height: 1.45;
}

.cookie-consent-text a {
    color: #fef08a;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 0.14em;
}

.cookie-consent-actions {
    display: flex;
    flex: 0 1 250px;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.45rem;
}

.cookie-consent-actions .btn {
    min-height: 38px;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.9rem;
    line-height: 1.1;
    letter-spacing: 0.01em;
    box-shadow: none;
}

.cookie-consent-btn-outline,
.cookie-consent-btn-neutral {
    color: #ffffff;
}

.cookie-consent-btn-outline {
    border: 1px solid rgba(255, 255, 255, 0.34);
    background: transparent;
}

.cookie-consent-btn-outline:hover,
.cookie-consent-btn-outline:focus {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.cookie-consent-btn-neutral {
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.12);
}

.cookie-consent-btn-neutral:hover,
.cookie-consent-btn-neutral:focus {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.28);
}

.cookie-consent-btn-accept {
    color: #1f2937;
}

.cookie-consent-panel {
    display: none;
    padding: 0.8rem 0.9rem 0.9rem;
    background: rgba(6, 17, 39, 0.28);
    border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.cookie-consent-panel.is-open {
    display: block;
}

.cookie-consent-option-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.cookie-consent-option {
    min-height: 100%;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.1);
    padding: 0.95rem 1rem;
}

.cookie-consent-option.is-required {
    background: rgba(255, 255, 255, 0.08);
}

.cookie-consent-toggle {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin: 0;
    cursor: pointer;
}

.cookie-consent-option.is-required .cookie-consent-toggle {
    cursor: default;
}

.cookie-consent-toggle input {
    width: 1.1rem;
    height: 1.1rem;
    margin-top: 0.18rem;
    accent-color: #fde047;
    flex: 0 0 auto;
}

.cookie-consent-option-title {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.25;
}

.cookie-consent-option-copy {
    margin: 0.35rem 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.9rem;
    line-height: 1.55;
}

.cookie-consent-required-tag {
    display: inline-flex;
    align-items: center;
    margin-left: 0.45rem;
    padding: 0.16rem 0.45rem;
    border-radius: 999px;
    background: rgba(250, 204, 21, 0.18);
    color: #fde68a;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cookie-consent-panel-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    margin-top: 0.95rem;
}

.cookie-consent-status {
    min-height: 1.2rem;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.88rem;
}

.cookie-consent-save {
    min-width: 150px;
    border-radius: 999px;
    font-weight: 700;
}

body.cookie-banner-visible {
    padding-bottom: var(--cookie-consent-offset, 0px);
}

body.cookie-banner-visible .install-app-button {
    bottom: calc(var(--cookie-consent-offset, 0px) + 1rem);
}

body.cookie-banner-visible .support-chat-launcher {
    bottom: calc(var(--cookie-consent-offset, 0px) + 10px + env(safe-area-inset-bottom, 0px));
}

body.has-mobile-dock .cookie-consent-shell {
    bottom: calc(5.95rem + env(safe-area-inset-bottom, 0px));
}

body.has-mobile-dock.cookie-banner-visible .install-app-button {
    bottom: calc(var(--cookie-consent-offset, 0px) + 84px + env(safe-area-inset-bottom, 0px));
}

body.has-mobile-dock.cookie-banner-visible .support-chat-launcher {
    bottom: calc(var(--cookie-consent-offset, 0px) + 5.7rem + env(safe-area-inset-bottom, 0px));
}

.site-footer-cookie-button {
    border: none;
    padding: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font: inherit;
}

.site-footer-cookie-button:hover,
.site-footer-cookie-button:focus {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 0.14em;
}

@media (max-width: 991.98px) {
    .cookie-consent-inner {
        flex-direction: column;
        justify-content: flex-start;
    }

    .cookie-consent-copy {
        flex: 1 1 auto;
    }

    .cookie-consent-actions {
        flex: 1 1 auto;
        justify-content: flex-start;
        width: 100%;
    }

    .cookie-consent-option-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .cookie-consent-shell {
        width: calc(100vw - 10px);
    }

    .cookie-consent-card {
        border-radius: 16px;
    }

    .cookie-consent-inner,
    .cookie-consent-panel {
        padding: 0.72rem 0.75rem;
    }

    .cookie-consent-eyebrow {
        font-size: 0.66rem;
        padding: 0.18rem 0.5rem;
    }

    .cookie-consent-title {
        font-size: 0.92rem;
    }

    .cookie-consent-text {
        max-width: none;
        font-size: 0.8rem;
        line-height: 1.38;
    }

    .cookie-consent-actions {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
        gap: 0.38rem;
    }

    .cookie-consent-actions .btn,
    .cookie-consent-save {
        width: 100%;
        justify-content: center;
        min-height: 35px;
        padding: 0.4rem 0.3rem;
        font-size: 0.8rem;
        white-space: nowrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cookie-consent-card,
    .cookie-consent-actions .btn,
    .site-footer-cookie-button {
        transition: none !important;
    }
}
