.cookie-banner,
.cookie-dialog {
    --cookie-ink: #18334a;
    --cookie-muted: #536c7d;
    --cookie-blue: #003b70;
    --cookie-blue-deep: #002d56;
    --cookie-green: #87bd3e;
    --cookie-line: #d6e1e8;
    --cookie-paper: #fbfcfa;
    color: var(--cookie-ink);
    font-family: inherit;
}

.cookie-banner[hidden] {
    display: none !important;
}

.cookie-footer-link {
    display: inline-block;
    margin: 0.5rem;
    padding: 0.35rem 0.5rem;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.cookie-footer-link:focus-visible {
    outline: 3px solid #87bd3e;
    outline-offset: 3px;
}

.cookie-page-footer { text-align: center; padding: 1rem; }
.cookie-toggle:has(input:disabled) { opacity: 0.65; cursor: not-allowed; }

.cookie-banner {
    position: fixed;
    z-index: 1100;
    inset: auto 1.25rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    max-width: 74rem;
    margin-inline: auto;
    padding: 1.25rem 1.4rem;
    border: 1px solid #c8d8e2;
    border-top: 4px solid var(--cookie-green);
    border-radius: 10px;
    background: var(--cookie-paper);
    box-shadow: 0 16px 42px rgba(17, 45, 67, 0.2);
}

.cookie-banner-copy {
    max-width: 44rem;
}

.cookie-banner-copy p,
.cookie-dialog-intro,
.cookie-preference-description,
.cookie-footer-note {
    margin: 0;
    color: var(--cookie-muted);
    font-size: 0.91rem;
    line-height: 1.55;
}

.cookie-banner-copy p + p {
    margin-top: 0.42rem;
}

.cookie-banner-actions,
.cookie-dialog-buttons {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.55rem;
}

.cookie-button {
    display: inline-flex;
    min-height: 2.65rem;
    align-items: center;
    justify-content: center;
    padding: 0.62rem 0.95rem;
    border: 1px solid transparent;
    border-radius: 6px;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 650;
    line-height: 1.1;
    text-align: center;
    cursor: pointer;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.cookie-button:hover {
    transform: translateY(-1px);
}

.cookie-button-primary {
    border-color: var(--cookie-blue);
    background: var(--cookie-blue);
    color: #fff;
}

.cookie-button-primary:hover {
    border-color: var(--cookie-blue-deep);
    background: var(--cookie-blue-deep);
}

.cookie-button-secondary {
    border-color: #afc2cf;
    background: #fff;
    color: var(--cookie-blue);
}

.cookie-button-secondary:hover {
    border-color: var(--cookie-blue);
    background: #f0f5f7;
}

.cookie-button-quiet {
    border-color: transparent;
    background: transparent;
    color: var(--cookie-blue);
}

.cookie-button-quiet:hover {
    background: #edf3f5;
}

.cookie-dialog {
    width: min(100% - 2rem, 35rem);
    max-width: 35rem;
    max-height: calc(100dvh - 2rem);
    padding: 0;
    overflow: auto;
    border: 1px solid #c8d8e2;
    border-radius: 12px;
    background: var(--cookie-paper);
    box-shadow: 0 24px 70px rgba(12, 38, 58, 0.28);
}

.cookie-dialog::backdrop {
    background: rgba(12, 35, 53, 0.56);
    backdrop-filter: blur(2px);
}

.cookie-dialog-form {
    padding: 1.65rem;
}

.cookie-dialog-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem;
    padding-bottom: 1.35rem;
}

.cookie-dialog-title {
    margin: 0 0 0.5rem;
    color: var(--cookie-blue-deep);
    font-size: clamp(1.35rem, 4vw, 1.65rem);
    font-weight: 750;
    letter-spacing: -0.035em;
    line-height: 1.15;
}

.cookie-close-button {
    display: grid;
    width: 2.5rem;
    height: 2.5rem;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid var(--cookie-line);
    border-radius: 7px;
    background: #fff;
    color: var(--cookie-blue);
    cursor: pointer;
}

.cookie-close-mark {
    position: relative;
    width: 0.85rem;
    height: 0.85rem;
}

.cookie-close-mark::before,
.cookie-close-mark::after {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    content: "";
}

.cookie-close-mark::before {
    transform: rotate(45deg);
}

.cookie-close-mark::after {
    transform: rotate(-45deg);
}

.cookie-preference-list {
    border-top: 1px solid var(--cookie-line);
}

.cookie-preference {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.2rem 0;
    border-bottom: 1px solid var(--cookie-line);
}

.cookie-preference-title {
    margin: 0 0 0.28rem;
    color: var(--cookie-ink);
    font-size: 1rem;
    font-weight: 700;
}

.cookie-preference-description {
    max-width: 25rem;
    font-size: 0.87rem;
}

.cookie-status {
    flex: 0 0 auto;
    padding: 0.42rem 0.62rem;
    border: 1px solid #d4e4bc;
    border-radius: 999px;
    background: #f1f6e9;
    color: #42651c;
    font-size: 0.75rem;
    font-weight: 700;
}

.cookie-toggle {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.6rem;
    color: var(--cookie-blue);
    font-size: 0.84rem;
    font-weight: 650;
    cursor: pointer;
}

.cookie-toggle-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.cookie-toggle-track {
    position: relative;
    width: 2.65rem;
    height: 1.5rem;
    flex: 0 0 auto;
    border: 1px solid #98aeba;
    border-radius: 999px;
    background: #dfe7eb;
    transition: background-color 150ms ease, border-color 150ms ease;
}

.cookie-toggle-track::after {
    position: absolute;
    top: 0.15rem;
    left: 0.15rem;
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(16, 42, 61, 0.25);
    content: "";
    transition: transform 150ms ease;
}

.cookie-toggle-input:checked + .cookie-toggle-track {
    border-color: #5c8c22;
    background: var(--cookie-green);
}

.cookie-toggle-input:checked + .cookie-toggle-track::after {
    transform: translateX(1.15rem);
}

.cookie-dialog-footer {
    padding-top: 1.2rem;
}

.cookie-footer-note {
    font-size: 0.82rem;
}

.cookie-dialog-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.1rem;
}

.cookie-policy-link {
    color: var(--cookie-blue);
    font-size: 0.87rem;
    font-weight: 650;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.cookie-policy-link:hover {
    color: var(--cookie-blue-deep);
}

.cookie-button:focus-visible,
.cookie-close-button:focus-visible,
.cookie-policy-link:focus-visible,
.cookie-toggle-input:focus-visible + .cookie-toggle-track {
    outline: 3px solid #4f7f1d;
    outline-offset: 3px;
}

@media (max-width: 760px) {
    .cookie-banner {
        inset: auto 0.75rem 0.75rem;
        display: block;
        padding: 1rem;
    }

    .cookie-banner-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        margin-top: 0.95rem;
    }

    .cookie-banner-actions .cookie-button-quiet {
        grid-column: 1 / -1;
    }
}

@media (max-width: 480px) {
    .cookie-dialog {
        width: calc(100% - 1rem);
        max-height: calc(100dvh - 1rem);
        border-radius: 10px;
    }

    .cookie-dialog-form {
        padding: 1.2rem;
    }

    .cookie-preference {
        align-items: flex-start;
    }

    .cookie-status {
        margin-top: 0.1rem;
    }

    .cookie-dialog-actions,
    .cookie-dialog-buttons {
        align-items: stretch;
        flex-direction: column;
    }

    .cookie-dialog-buttons {
        width: 100%;
    }

    .cookie-dialog-buttons .cookie-button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cookie-button,
    .cookie-toggle-track,
    .cookie-toggle-track::after {
        transition: none;
    }
}
