.cookie-consent-backdrop {
    position: fixed;
    inset: auto 16px 16px 16px;
    z-index: 99999;
    display: flex;
    justify-content: center;
    pointer-events: none;
}

.cookie-consent-panel {
    width: min(980px, 100%);
    background: rgba(10, 21, 38, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
    border-radius: 22px;
    padding: 18px;
    color: #f8fafc;
    pointer-events: auto;
    backdrop-filter: blur(16px);
}

.cookie-consent-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    align-items: center;
}

.cookie-consent-title {
    margin: 0 0 6px;
    font-size: 18px;
    line-height: 1.25;
    font-weight: 800;
}

.cookie-consent-text {
    margin: 0;
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.55;
}

.cookie-consent-text a,
.cookie-consent-more a {
    color: #93c5fd;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cookie-consent-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.cookie-btn {
    appearance: none;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 999px;
    padding: 10px 16px;
    color: #f8fafc;
    background: rgba(15, 23, 42, 0.72);
    font-weight: 800;
    cursor: pointer;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.cookie-btn:hover,
.cookie-btn:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(147, 197, 253, 0.75);
    outline: none;
}

.cookie-btn-primary {
    border-color: transparent;
    background: linear-gradient(135deg, #60a5fa, #8b5cf6);
    color: #ffffff;
}

.cookie-btn-ghost {
    background: transparent;
}

.cookie-consent-preferences {
    display: none;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

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

.cookie-choice {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 12px 0;
}

.cookie-choice + .cookie-choice {
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.cookie-choice strong {
    display: block;
    margin-bottom: 3px;
    color: #ffffff;
}

.cookie-choice span {
    color: #cbd5e1;
    font-size: 13px;
    line-height: 1.45;
}

.cookie-toggle {
    position: relative;
    display: inline-flex;
    width: 52px;
    height: 30px;
    flex: 0 0 auto;
}

.cookie-toggle input {
    position: absolute;
    opacity: 0;
    inset: 0;
}

.cookie-toggle span {
    width: 100%;
    height: 100%;
    border-radius: 999px;
    background: rgba(71, 85, 105, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.28);
    transition: background 160ms ease;
}

.cookie-toggle span::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: #ffffff;
    transition: transform 160ms ease;
}

.cookie-toggle input:checked + span {
    background: linear-gradient(135deg, #60a5fa, #8b5cf6);
}

.cookie-toggle input:checked + span::after {
    transform: translateX(22px);
}

.cookie-toggle input:disabled + span {
    opacity: 0.65;
    cursor: not-allowed;
}

.cookie-consent-more {
    margin: 10px 0 0;
    color: #cbd5e1;
    font-size: 12px;
    line-height: 1.5;
}

@media (max-width: 760px) {
    .cookie-consent-backdrop {
        inset: auto 10px 10px 10px;
    }

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

    .cookie-consent-actions {
        justify-content: stretch;
    }

    .cookie-btn {
        flex: 1 1 auto;
    }
}
