.cookie-consent,
.cookie-modal__dialog {
    color: var(--text-0);
    background:
        linear-gradient(145deg, rgba(21, 27, 43, 0.98), rgba(12, 17, 29, 0.98)),
        var(--surface-1);
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(18px);
}

.cookie-consent {
    position: fixed;
    right: clamp(1rem, 3vw, 2rem);
    bottom: clamp(1rem, 3vw, 2rem);
    z-index: 1090;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1.25rem;
    width: min(680px, calc(100vw - 2rem));
    padding: 1rem;
    border-radius: 14px;
}

.cookie-consent[hidden],
.cookie-modal[hidden] {
    display: none !important;
}

.cookie-consent__content {
    min-width: 0;
}

.cookie-consent__eyebrow {
    margin: 0 0 0.25rem;
    color: var(--brand-blue, #3B82F6);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cookie-consent h2,
.cookie-modal h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0;
}

.cookie-consent p,
.cookie-modal p {
    color: var(--text-2);
    font-size: 0.88rem;
    line-height: 1.55;
}

.cookie-consent__content p:last-child {
    margin-bottom: 0;
}

.cookie-consent__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.cookie-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.cookie-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(1, 6, 18, 0.68);
}

.cookie-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(620px, 100%);
    max-height: calc(100vh - 2rem);
    overflow: auto;
    border-radius: 16px;
}

.cookie-modal__header,
.cookie-modal__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
}

.cookie-modal__header {
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.cookie-modal__footer {
    border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.cookie-modal__body {
    display: grid;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
}

.cookie-modal__close {
    display: inline-grid;
    width: 2.25rem;
    height: 2.25rem;
    place-items: center;
    color: var(--text-1);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
}

.cookie-modal__close:hover {
    color: var(--text-0);
    background: rgba(255, 255, 255, 0.1);
}

.cookie-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 12px;
}

.cookie-option h3 {
    margin: 0 0 0.25rem;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0;
}

.cookie-option p {
    margin: 0;
}

.cookie-option--toggle {
    cursor: pointer;
}

.cookie-option__status {
    flex: 0 0 auto;
    color: var(--brand-blue, #3B82F6);
    font-size: 0.8rem;
    font-weight: 700;
}

.cookie-switch {
    position: relative;
    flex: 0 0 auto;
    width: 3rem;
    height: 1.6rem;
}

.cookie-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.cookie-switch span {
    position: absolute;
    inset: 0;
    background: rgba(148, 163, 184, 0.25);
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 999px;
    transition: background-color 160ms ease, border-color 160ms ease;
}

.cookie-switch span::after {
    content: "";
    position: absolute;
    top: 0.18rem;
    left: 0.18rem;
    width: 1.12rem;
    height: 1.12rem;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    transition: transform 160ms ease;
}

.cookie-switch input:checked + span {
    background: rgba(74, 107, 255, 0.85);
    border-color: rgba(74, 107, 255, 0.95);
}

.cookie-switch input:checked + span::after {
    transform: translateX(1.38rem);
}

.cookie-modal__link {
    color: var(--text-1);
    font-size: 0.86rem;
    font-weight: 600;
    text-decoration: none;
}

.cookie-modal__link:hover {
    color: var(--text-0);
    text-decoration: underline;
}

.cookie-modal__buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
}

.cookie-modal-open {
    overflow: hidden;
}

@media (max-width: 720px) {
    .cookie-consent {
        grid-template-columns: 1fr;
    }

    .cookie-consent__actions,
    .cookie-modal__footer {
        align-items: stretch;
        flex-direction: column;
    }

    .cookie-consent__actions .btn,
    .cookie-modal__buttons,
    .cookie-modal__buttons .btn {
        width: 100%;
    }

    .cookie-option {
        align-items: flex-start;
        flex-direction: column;
    }
}
