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

.cookie-consent {
    --cookie-blue: var(--color-brand, #312f80);
    --cookie-text: #333333;
    --cookie-muted: #707070;
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    color: var(--cookie-text);
    font-family: inherit;
    line-height: 1.4;
}

.cookie-consent__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.56);
}

.cookie-consent__dialog {
    position: relative;
    z-index: 1;
    width: min(48vw, 900px);
    overflow: hidden;
    /* border-radius: 30px; */
    background: #fff;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.16);
}

.cookie-consent__dialog--summary {
    padding: 44px;
}

.cookie-consent__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
}

.cookie-consent__header h2 {
    margin: 0;
    color: var(--cookie-text);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
}

.cookie-consent__header-actions {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0px;
}

.cookie-consent__icon-button {
    display: inline-flex;
    width: 46px;
    height: 46px;
    align-items: center;
    justify-content: center;
    padding: 0px;
    border: 0;
    background: transparent;
    color: var(--cookie-text);
    cursor: pointer;
}

.cookie-consent__icon-button svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cookie-consent__close svg {
    width: 28px;
    height: 28px;
    stroke-width: 1.8;
}

.cookie-consent__language-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 3;
    min-width: 190px;
    padding: 8px 0;
    background: #fff;
    box-shadow: 0 5px 22px rgba(0, 0, 0, 0.2);
}

.cookie-consent__language-menu a {
    display: block;
    padding: 12px 18px;
    color: #111;
    font-size: 15px;
    text-decoration: none;
}

.cookie-consent__language-menu a:hover,
.cookie-consent__language-menu a:focus-visible {
    background: #f2f2f2;
}

.cookie-consent__summary-content > p,
.cookie-consent__preference-intro {
    margin: 0 0 18px;
    font-size: 18px;
    line-height: 1.45;
}

.cookie-consent__links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin: 0 0 18px;
    font-size: 16px;
}

.cookie-consent a,
.cookie-consent__text-button {
    color: var(--cookie-blue);
}

.cookie-consent__links a,
.cookie-consent__text-button {
    text-decoration: none;
}

.cookie-consent__text-button {
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    cursor: pointer;
}

.cookie-consent__actions {
    display: flex;
    gap: 12px;
}

.cookie-consent__actions--summary > * {
    flex: 1 1 0;
}

.cookie-consent__button {
    min-height: 48px;
    padding: 12px 20px;
    border: 2px solid var(--cookie-blue);
    border-radius: 10px;
    background: #fff;
    color: var(--cookie-blue);
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
    cursor: pointer;
}

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

.cookie-consent__button--plain {
    border-color: transparent;
    color: #111;
}

.cookie-consent__button:hover {
    filter: brightness(0.96);
}

.cookie-consent__button--tertiary {
    border: 0;
    background: transparent;
    color: #111;
    box-shadow: none;
}

.cookie-consent__button--tertiary:hover,
.cookie-consent__button--tertiary:focus-visible {
    color: var(--cookie-blue);
    filter: none;
}

.cookie-consent__dialog--preferences {
    display: flex;
    max-height: min(86vh, 1420px);
    min-height: min(78vh, 1200px);
    flex-direction: column;
    overflow: hidden;
}

.cookie-consent__dialog--preferences > .cookie-consent__header {
    flex: 0 0 auto;
    margin-bottom: 18px;
    padding: 16px 32px 16px;
    border-bottom: 1px solid #dedede;
}

.cookie-consent__preferences-scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 0 32px 20px;
}

.cookie-consent__preference-intro {
    margin-bottom: 18px;
}

.cookie-consent__category-list {
    display: grid;
    gap: 16px;
}

.cookie-consent__always-active {
    flex: 0 0 auto;
    align-self: flex-start;
    padding-top: 4px;
    color: #218653;
    font-size: 15px;
    font-weight: 700;
}

.cookie-consent__category-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px 20px;
    padding: 18px 16px;
    border: 2px solid #dedede;
    border-radius: 20px;
}

.cookie-consent__category-copy h3 {
    margin: 0 0 8px;
    color: var(--cookie-text);
    font-size: 17px;
    line-height: 1.35;
}

.cookie-consent__category-copy p {
    margin: 0;
    color: var(--cookie-muted);
    font-size: 16px;
    line-height: 1.45;
}

.cookie-consent .cookie-consent__switch {
    display: inline-flex;
    width: 56px;
    min-width: 56px;
    height: 32px;
    flex: 0 0 56px;
    align-items: center;
    justify-content: flex-start;
    padding: 4px;
    border: 0;
    border-radius: 999px;
    appearance: none;
    background: #bdbdbd;
    cursor: pointer;
}

.cookie-consent__switch span {
    display: block;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    border-radius: 50%;
    background: #fff;
    transition: transform 160ms ease;
}

.cookie-consent .cookie-consent__switch[aria-checked="true"] {
    background: var(--cookie-blue);
}

.cookie-consent .cookie-consent__switch[aria-checked="true"] span {
    transform: translateX(20px);
}

.cookie-consent__switch:focus-visible {
    outline: 3px solid var(--cookie-blue);
    outline-offset: 3px;
}

.cookie-consent__actions--preferences {
    flex: 0 0 auto;
    justify-content: flex-end;
    gap: 12px;
    padding: 14px 32px;
    border-top: 1px solid #d8d8d8;
    background: #fff;
}

.cookie-consent__actions--preferences > * {
    min-width: 25%;
}

.site-footer__cookie-settings {
    margin-top: 8px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

@media (max-width: 767px) {
    .cookie-consent {
        padding: 12px;
    }

    .cookie-consent__dialog--summary {
        width: 100%;
        padding: 24px 20px 20px;
    }

    .cookie-consent__header {
        gap: 12px;
        margin-bottom: 14px;
    }

    .cookie-consent__header h2 {
        font-size: 18px;
    }

    .cookie-consent__icon-button {
        width: 38px;
        height: 38px;
    }

    .cookie-consent__icon-button svg {
        width: 28px;
        height: 28px;
    }

    .cookie-consent__summary-content > p,
    .cookie-consent__preference-intro {
        font-size: 15px;
        line-height: 1.45;
    }

    .cookie-consent__links {
        gap: 18px;
        margin-bottom: 18px;
        font-size: 15px;
    }

    .cookie-consent__actions {
        gap: 12px;
    }

    .cookie-consent__button {
        min-height: 56px;
        padding: 12px 10px;
        border-width: 2px;
        border-radius: 12px;
        font-size: 14px;
    }

    .cookie-consent__dialog--preferences {
        width: 100%;
        max-height: calc(100dvh - 24px);
        min-height: calc(100dvh - 24px);
    }

    .cookie-consent__dialog--preferences > .cookie-consent__header {
        margin-bottom: 18px;
        padding: 18px 18px 14px;
    }

    .cookie-consent__preferences-scroll {
        padding: 0 18px 18px;
    }

    .cookie-consent__category-card {
        gap: 14px 10px;
        padding: 16px 12px;
    }

    .cookie-consent__category-copy h3 {
        font-size: 16px;
    }

    .cookie-consent__category-copy p {
        font-size: 14px;
    }

    .cookie-consent__always-active {
        font-size: 13px;
    }

    .cookie-consent .cookie-consent__switch {
        width: 48px;
        min-width: 48px;
        height: 28px;
        flex: 0 0 48px;
        padding: 4px;
    }

    .cookie-consent__switch span {
        width: 20px;
        height: 20px;
        flex-basis: 20px;
    }

    .cookie-consent .cookie-consent__switch[aria-checked="true"] span {
        transform: translateX(20px);
    }

    .cookie-consent__actions--preferences {
        gap: 7px;
        padding: 12px 10px;
    }

    .cookie-consent__actions--preferences > * {
        min-width: 0;
        flex: 1 1 0;
        padding-right: 5px;
        padding-left: 5px;
        font-size: 12px;
    }
}
