.cookie-preferences-link {
    display: block;
    margin: 16px auto 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #b22862;
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.cookie-preferences-link[hidden] {
    display: none;
}

.cookie-consent-banner,
.cookie-consent-dialog,
.cookie-consent-backdrop {
    position: fixed;
    z-index: 10000;
}

.cookie-consent-banner[hidden],
.cookie-consent-dialog[hidden],
.cookie-consent-backdrop[hidden] {
    display: none;
}

.cookie-consent-banner {
    right: 20px;
    bottom: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    max-width: 1160px;
    margin: 0 auto;
    padding: 22px;
    border: 1px solid #e1e4eb;
    border-radius: 12px;
    background: #fff;
    color: #263248;
    box-shadow: 0 12px 48px rgba(16, 24, 40, .24);
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.cookie-consent-copy {
    max-width: 650px;
}

.cookie-consent-copy h2,
.cookie-consent-copy .cookie-consent-banner-title,
.cookie-consent-dialog h2,
.cookie-consent-dialog .cookie-consent-dialog-title {
    margin: 0 0 8px;
    color: #1f3154;
    font-size: 20px;
    font-weight: 750;
}

.cookie-consent-copy p,
.cookie-consent-dialog p {
    margin: 0;
    color: #526078;
    font-size: 14px;
    line-height: 1.55;
}

.cookie-consent-copy a {
    color: #9b1740 !important;
    text-decoration: underline !important;
    font-weight: 650;
}

.cookie-consent-actions,
.cookie-consent-dialog-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.cookie-consent-actions {
    flex: 0 0 410px;
    flex-direction: column;
}

.cookie-consent-actions button,
.cookie-consent-dialog-actions button {
    min-height: 44px;
    padding: 10px 14px;
    border: 2px solid #8b1e3f;
    border-radius: 7px;
    background: #8b1e3f;
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
}

.cookie-consent-actions button {
    width: 100%;
}

.cookie-consent-actions button:hover,
.cookie-consent-dialog-actions button:hover {
    background: #6e1732;
    border-color: #6e1732;
}

.cookie-consent-backdrop {
    inset: 0;
    background: rgba(15, 23, 42, .55);
}

.cookie-consent-dialog {
    top: 50%;
    left: 50%;
    width: min(620px, calc(100vw - 32px));
    max-height: min(90vh, 760px);
    overflow-y: auto;
    padding: 24px;
    transform: translate(-50%, -50%);
    border-radius: 12px;
    background: #fff;
    color: #263248;
    box-shadow: 0 20px 70px rgba(0, 0, 0, .3);
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.cookie-consent-dialog-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.cookie-consent-close {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border: 1px solid #d5d9e2;
    border-radius: 50%;
    background: #fff;
    color: #263248;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.cookie-consent-category {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-top: 1px solid #e8ebf0;
}

.cookie-consent-category h3,
.cookie-consent-category .cookie-consent-category-title {
    margin: 0 0 4px;
    color: #27344a;
    font-size: 15px;
    font-weight: 750;
}

.cookie-consent-category p {
    max-width: 470px;
}

.cookie-consent-switch {
    position: relative;
    flex: 0 0 auto;
    width: 46px;
    height: 26px;
}

.cookie-consent-switch input {
    width: 1px;
    height: 1px;
    opacity: 0;
}

.cookie-consent-switch span {
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: #aab2c0;
    cursor: pointer;
    transition: background .15s ease;
}

.cookie-consent-switch span::before {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    content: "";
    transition: transform .15s ease;
}

.cookie-consent-switch input:checked + span {
    background: #8b1e3f;
}

.cookie-consent-switch input:checked + span::before {
    transform: translateX(20px);
}

.cookie-consent-switch input:focus-visible + span,
.cookie-consent-actions button:focus-visible,
.cookie-consent-dialog button:focus-visible,
.cookie-preferences-link:focus-visible {
    outline: 3px solid #f1a4be;
    outline-offset: 3px;
}

.cookie-consent-switch input:disabled + span {
    cursor: not-allowed;
    opacity: .7;
}

.cookie-consent-dialog-actions {
    justify-content: flex-end;
    padding-top: 18px;
    border-top: 1px solid #e8ebf0;
}

@media (max-width: 760px) {
    .cookie-consent-banner {
        right: 10px;
        bottom: 10px;
        left: 10px;
        display: block;
        max-height: 90vh;
        overflow-y: auto;
        padding: 18px;
    }

    .cookie-consent-actions {
        margin-top: 14px;
        width: 100%;
    }

    .cookie-consent-dialog {
        padding: 20px 16px;
    }

    .cookie-consent-dialog-actions {
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cookie-consent-switch span,
    .cookie-consent-switch span::before {
        transition: none;
    }
}
