/* Cookie consent, preference dialog and consent-gated embeds */

#cookie-consent-banner,
#cookie-consent-dialog,
#cookie-consent-banner *,
#cookie-consent-dialog *,
.consent-embed-placeholder,
.consent-embed-placeholder * {
    box-sizing: border-box;
}

#cookie-consent-banner {
    position: fixed;
    z-index: 9999;
    inset-inline: 0;
    bottom: 0;
    width: 100%;
    max-width: 1920px;
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
    margin-inline: auto;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #071041;
    color: #fff;
    box-shadow: 0 -8px 30px rgba(7, 16, 65, 0.24);
    font-family: Krub, sans-serif;
}

#cookie-consent-banner[hidden],
#cookie-consent-dialog[hidden],
.consent-embed-placeholder[hidden] {
    display: none !important;
}

#cookie-consent-banner .consent-banner__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 24px 40px;
    width: 100%;
    max-width: 1700px;
    margin-inline: auto;
    padding: 26px 20px;
}

#cookie-consent-banner .consent-banner__content {
    min-width: 0;
    max-width: 1000px;
}

#cookie-consent-banner .consent-banner__title {
    margin: 0;
    color: #0092d7;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

#cookie-consent-banner .consent-banner__description {
    margin-top: 8px;
    color: #fff;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

#cookie-consent-banner .consent-banner__description a {
    color: #97d3ed;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

#cookie-consent-banner .consent-banner__description a:hover {
    color: #fff;
}

.consent-actions,
#cookie-consent-banner .consent-banner__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

#cookie-consent-banner .consent-banner__actions {
    justify-content: flex-end;
    max-width: 650px;
}

.consent-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 170px;
    min-height: 48px;
    max-width: 100%;
    margin: 0;
    padding: 12px 20px;
    border: 2px solid transparent;
    border-radius: 100px 0 100px 0;
    font-family: Krub, sans-serif;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    text-decoration: none;
    overflow-wrap: anywhere;
    cursor: pointer;
    transition: background-color 0.25s ease, border-color 0.25s ease,
        color 0.25s ease;
}

.consent-button--primary {
    border-color: #003083;
    background: #003083;
    color: #fff;
}

.consent-button--primary:hover {
    border-color: #194f94;
    background: #194f94;
    color: #fff;
}

.consent-button--secondary {
    border-color: #003083;
    background: #fff;
    color: #003083;
}

.consent-button--secondary:hover {
    background: #ecf3fa;
    color: #00256d;
}

.consent-button--text {
    min-width: 0;
    border-color: transparent;
    border-radius: 0;
    background: transparent;
    color: #003083;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

.consent-button--text:hover {
    color: #194f94;
    text-decoration-thickness: 2px;
}

.consent-button:disabled,
.consent-button[aria-disabled="true"] {
    opacity: 0.55;
    cursor: not-allowed;
}

#cookie-consent-banner .consent-button--secondary {
    border-color: #0092d7;
    background: transparent;
    color: #fff;
}

#cookie-consent-banner .consent-button--secondary:hover {
    border-color: #97d3ed;
    background: rgba(151, 211, 237, 0.12);
    color: #fff;
}

#cookie-consent-banner .consent-button--text {
    color: #fff;
}

#cookie-consent-banner .consent-button--text:hover {
    color: #97d3ed;
}

/* Native preference dialog */

#cookie-consent-dialog {
    position: fixed;
    inset: 0;
    width: calc(100% - 40px);
    max-width: 780px;
    max-height: calc(100vh - 40px);
    max-height: calc(100dvh - 40px);
    margin: auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: #333;
    font-family: Krub, sans-serif;
    overflow: visible;
}

#cookie-consent-dialog:not([open]) {
    display: none;
}

#cookie-consent-dialog::backdrop {
    background: rgba(7, 16, 65, 0.76);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

#cookie-consent-dialog .consent-dialog__surface {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    max-height: inherit;
    min-height: 0;
    border: 1px solid #ccd4e7;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 20px 60px rgba(7, 16, 65, 0.32);
    overflow: hidden;
}

#cookie-consent-dialog .consent-dialog__header {
    position: relative;
    flex: 0 0 auto;
    padding: 26px 80px 20px 30px;
    border-bottom: 1px solid #ccd4e7;
    background: #fff;
}

#cookie-consent-dialog .consent-dialog__title {
    margin: 0;
    color: #003083;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

#cookie-consent-dialog .consent-dialog__intro {
    margin-top: 8px;
    color: #5f5f5f;
    font-size: 15px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

#cookie-consent-dialog .consent-dialog__intro a {
    color: #003083;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

#cookie-consent-dialog .consent-dialog__close {
    position: absolute;
    top: 20px;
    right: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #ccd4e7;
    border-radius: 50%;
    background: #fff;
    color: #003083;
    font-family: Krub, sans-serif;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.25s ease, border-color 0.25s ease;
}

#cookie-consent-dialog .consent-dialog__close:hover {
    border-color: #0090d0;
    background: #ecf3fa;
}

#cookie-consent-dialog .consent-dialog__body {
    flex: 1 1 auto;
    min-height: 0;
    padding: 22px 30px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

#cookie-consent-dialog .consent-dialog__footer {
    flex: 0 0 auto;
    padding: 18px 30px 22px;
    border-top: 1px solid #ccd4e7;
    background: #f8f9fc;
}

#cookie-consent-dialog .consent-dialog__footer .consent-actions,
#cookie-consent-dialog .consent-dialog__footer.consent-actions {
    justify-content: flex-end;
}

.consent-category {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px 24px;
    min-width: 0;
    padding: 18px 20px;
    border: 1px solid #ccd4e7;
    border-radius: 12px;
    background: #f8f9fc;
}

.consent-category + .consent-category {
    margin-top: 12px;
}

.consent-category > *,
.consent-category__content {
    min-width: 0;
}

.consent-category h3,
.consent-category__heading,
.consent-category__title {
    margin: 0;
    color: #003083;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.consent-category p,
.consent-category__description {
    margin-top: 5px;
    color: #5f5f5f;
    font-size: 14px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.consent-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    min-width: 0;
    max-width: 100%;
    color: #003083;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    cursor: pointer;
}

.consent-toggle > input[type="checkbox"] {
    position: absolute;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    border: 0 !important;
    opacity: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.consent-toggle__track {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
    width: 52px;
    height: 30px;
    padding: 3px;
    border: 2px solid #6681b8;
    border-radius: 100px;
    background: #fff;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.consent-toggle__thumb {
    display: block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #6681b8;
    box-shadow: 0 1px 4px rgba(7, 16, 65, 0.25);
    transform: translateX(0);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.consent-toggle > input[type="checkbox"]:checked + .consent-toggle__track {
    border-color: #003083;
    background: #003083;
}

.consent-toggle > input[type="checkbox"]:checked + .consent-toggle__track .consent-toggle__thumb {
    background: #fff;
    transform: translateX(22px);
}

.consent-toggle > input[type="checkbox"]:disabled ~ * {
    cursor: not-allowed;
}

.consent-toggle > input[type="checkbox"]:disabled + .consent-toggle__track {
    opacity: 0.7;
}

.consent-toggle__label {
    min-width: 0;
    max-width: 150px;
    overflow-wrap: anywhere;
}

/* Visible keyboard focus is restored locally because the legacy reset removes it. */

#cookie-consent-dialog a:focus,
#cookie-consent-dialog button:focus,
.consent-button:focus,
.consent-embed-placeholder a:focus,
.consent-embed-placeholder button:focus,
.legal-page a:focus,
.legal-page button:focus {
    outline: 3px solid #003083;
    outline-offset: 3px;
}

#cookie-consent-banner a:focus,
#cookie-consent-banner button:focus {
    outline: 3px solid #ecad01;
    outline-offset: 3px;
}

#cookie-consent-banner a:focus:not(:focus-visible),
#cookie-consent-banner button:focus:not(:focus-visible),
#cookie-consent-dialog a:focus:not(:focus-visible),
#cookie-consent-dialog button:focus:not(:focus-visible),
.consent-button:focus:not(:focus-visible),
.consent-embed-placeholder a:focus:not(:focus-visible),
.consent-embed-placeholder button:focus:not(:focus-visible),
.legal-page a:focus:not(:focus-visible),
.legal-page button:focus:not(:focus-visible) {
    outline: none;
}

#cookie-consent-dialog a:focus-visible,
#cookie-consent-dialog button:focus-visible,
.consent-button:focus-visible,
.consent-embed-placeholder a:focus-visible,
.consent-embed-placeholder button:focus-visible,
.legal-page a:focus-visible,
.legal-page button:focus-visible {
    outline: 3px solid #003083;
    outline-offset: 3px;
}

#cookie-consent-banner a:focus-visible,
#cookie-consent-banner button:focus-visible {
    outline: 3px solid #ecad01;
    outline-offset: 3px;
}

.consent-toggle > input[type="checkbox"]:focus + .consent-toggle__track {
    outline: 3px solid #003083;
    outline-offset: 3px;
}

.consent-toggle > input[type="checkbox"]:focus:not(:focus-visible) + .consent-toggle__track {
    outline: none;
}

.consent-toggle > input[type="checkbox"]:focus-visible + .consent-toggle__track {
    outline: 3px solid #003083;
    outline-offset: 3px;
}

/* Placeholder shown until the relevant third-party category is granted. */

.consent-embed-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
    min-height: clamp(180px, 32vw, 360px);
    padding: 28px;
    border: 1px solid #ccd4e7;
    border-radius: 12px;
    background: #ecf3fa;
    color: #333;
    font-family: Krub, sans-serif;
    line-height: 1.55;
    text-align: center;
    overflow: hidden;
    overflow-wrap: anywhere;
}

.consent-embed-placeholder__icon {
    width: 44px;
    height: 44px;
    color: #003083;
}

.consent-embed-placeholder__title {
    margin: 0;
    color: #003083;
    font-size: 18px;
    font-weight: 700;
}

.consent-embed-placeholder__description {
    max-width: 620px;
    margin: 0;
    color: #5f5f5f;
    font-size: 14px;
}

.consent-embed-placeholder .consent-actions {
    justify-content: center;
    margin-top: 4px;
}

.video-gallery__thumbnail .consent-embed-placeholder {
    position: absolute;
    inset: 0;
    min-height: 0;
    padding: 18px;
    border: 0;
    border-radius: 0;
}

.video-gallery__thumbnail:not([data-consent-state="loaded"]) .video-gallery__play-btn {
    display: none;
}

.video-gallery__thumbnail[data-consent-state="loaded"] .video-gallery__play-btn {
    display: flex;
}

/* Footer entry points share one appearance whether rendered as links or buttons. */

.consent-footer-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 20px;
    min-width: 0;
    max-width: 100%;
}

.consent-footer-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    margin: 0;
    padding: 7px 3px;
    border: 0;
    background: transparent;
    color: inherit;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    overflow-wrap: anywhere;
    cursor: pointer;
    transition: opacity 0.2s ease, text-decoration-thickness 0.2s ease;
}

.consent-footer-link:hover {
    opacity: 0.8;
    text-decoration-thickness: 2px;
}

.consent-footer-link:focus {
    outline: 3px solid currentColor;
    outline-offset: 3px;
}

.consent-footer-link:focus:not(:focus-visible) {
    outline: none;
}

.consent-footer-link:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 3px;
}

/* Kept only as a safe target for the legacy minified cookie handler. */

.consent-legacy-hook {
    display: none !important;
}

/* Cookie and privacy policy pages */

.legal-page {
    min-width: 0;
    color: #333;
    background: #fff;
    font-family: Krub, sans-serif;
}

.legal-page__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px 32px;
    padding: 18px clamp(20px, 5vw, 72px);
    background: #ecf3fa;
    color: #003083;
}

.legal-page__header img {
    display: block;
    width: min(196px, 42vw);
    height: auto;
}

.legal-page__nav,
.legal-page__footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 22px;
}

.legal-page__nav a,
.legal-page__nav button,
.legal-page__footer a,
.legal-page__footer button {
    margin: 0;
    padding: 8px 2px;
    border: 0;
    background: transparent;
    color: #003083;
    font: inherit;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 4px;
    cursor: pointer;
}

.legal-page__header h1 {
    max-width: 1000px;
    margin: 0 auto;
    font-size: clamp(30px, 4vw, 50px);
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.legal-page__header p {
    max-width: 820px;
    margin: 12px auto 0;
    color: #5f5f5f;
    font-size: 16px;
    line-height: 1.6;
}

.legal-page__content {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: clamp(36px, 5vw, 64px) 20px clamp(60px, 8vw, 100px);
    font-size: 17px;
    line-height: 1.75;
    overflow-wrap: anywhere;
}

.legal-page__content > article > h1 {
    margin: 0;
    color: #003083;
    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.2;
}

.legal-page__content > article > p {
    margin-top: 16px;
}

.legal-page__eyebrow {
    color: #0092d7;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.legal-page__updated {
    color: #5f5f5f;
    font-size: 15px;
}

.legal-page code {
    padding: 2px 5px;
    border-radius: 4px;
    background: #ecf3fa;
    color: #071041;
    font-size: 0.92em;
    overflow-wrap: anywhere;
}

.legal-page__footer {
    padding: 24px 20px 32px;
    border-top: 1px solid #ccd4e7;
    background: #ecf3fa;
}

.legal-page__section + .legal-page__section {
    margin-top: 38px;
}

.legal-page__section h2,
.legal-page__section h3 {
    margin: 0;
    color: #003083;
    font-weight: 700;
    line-height: 1.35;
}

.legal-page__section h2 {
    font-size: 26px;
}

.legal-page__section h3 {
    margin-top: 22px;
    font-size: 20px;
}

.legal-page__section p,
.legal-page__section ul,
.legal-page__section ol {
    margin-top: 12px;
}

.legal-page__section ul,
.legal-page__section ol {
    padding-left: 24px;
}

.legal-page__section ul {
    list-style: disc;
}

.legal-page__section ol {
    list-style: decimal;
}

.legal-page__section a {
    color: #003083;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.legal-page__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 36px;
}

@media (max-width: 1660px) {
    #cookie-consent-banner .consent-banner__inner {
        max-width: 1360px;
    }
}

@media (max-width: 1400px) {
    #cookie-consent-banner .consent-banner__inner {
        max-width: 1180px;
    }

    #cookie-consent-banner .consent-banner__title {
        font-size: 22px;
    }

    .consent-button {
        font-size: 14px;
    }
}

@media (max-width: 1200px) {
    #cookie-consent-banner .consent-banner__inner {
        grid-template-columns: minmax(0, 1fr);
        max-width: 990px;
        padding-inline: 15px;
    }

    #cookie-consent-banner .consent-banner__content {
        max-width: none;
    }

    #cookie-consent-banner .consent-banner__actions {
        justify-content: flex-start;
        max-width: none;
    }
}

@media (max-width: 992px) {
    #cookie-consent-banner .consent-banner__inner {
        max-width: 750px;
    }

    #cookie-consent-dialog {
        width: calc(100% - 32px);
        max-height: calc(100vh - 32px);
        max-height: calc(100dvh - 32px);
    }
}

@media (max-width: 600px) {
    #cookie-consent-banner {
        max-height: calc(100vh - 8px);
        max-height: calc(100dvh - 8px);
    }

    #cookie-consent-banner .consent-banner__inner {
        gap: 18px;
        padding: 20px 15px;
    }

    #cookie-consent-banner .consent-banner__title {
        font-size: 20px;
    }

    #cookie-consent-banner .consent-banner__description {
        font-size: 14px;
        line-height: 1.55;
    }

    #cookie-consent-banner .consent-banner__actions,
    #cookie-consent-dialog .consent-dialog__footer .consent-actions,
    #cookie-consent-dialog .consent-dialog__footer.consent-actions,
    .consent-embed-placeholder .consent-actions,
    .legal-page__actions {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .consent-button,
    #cookie-consent-banner .consent-button {
        width: 100%;
        min-width: 0;
    }

    #cookie-consent-dialog {
        width: calc(100% - 20px);
        max-height: calc(100vh - 20px);
        max-height: calc(100dvh - 20px);
    }

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

    #cookie-consent-dialog .consent-dialog__title {
        font-size: 22px;
    }

    #cookie-consent-dialog .consent-dialog__intro {
        font-size: 14px;
    }

    #cookie-consent-dialog .consent-dialog__close {
        top: 14px;
        right: 14px;
        width: 40px;
        height: 40px;
    }

    #cookie-consent-dialog .consent-dialog__body {
        padding: 16px;
        scrollbar-gutter: auto;
    }

    #cookie-consent-dialog .consent-dialog__footer {
        padding: 14px 16px 16px;
    }

    .consent-category {
        grid-template-columns: minmax(0, 1fr);
        gap: 13px;
        padding: 15px;
    }

    .consent-toggle {
        justify-self: start;
        justify-content: flex-start;
    }

    .consent-toggle__label {
        max-width: none;
    }

    .consent-embed-placeholder {
        min-height: 180px;
        padding: 22px 16px;
    }

    .legal-page__header {
        flex-direction: column;
        padding-inline: 15px;
    }

    .legal-page__content {
        padding-inline: 15px;
        font-size: 16px;
    }

    .legal-page__section h2 {
        font-size: 22px;
    }
}

html[dir="rtl"] .consent-toggle > input[type="checkbox"]:checked + .consent-toggle__track .consent-toggle__thumb {
    transform: translateX(-22px);
}

@media (prefers-reduced-motion: reduce) {
    #cookie-consent-banner *,
    #cookie-consent-dialog *,
    .consent-button,
    .consent-toggle__track,
    .consent-toggle__thumb,
    .consent-footer-link,
    .consent-embed-placeholder * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

@media (forced-colors: active) {
    .consent-button,
    #cookie-consent-dialog .consent-dialog__close,
    .consent-toggle__track,
    .consent-category,
    .consent-embed-placeholder {
        border: 2px solid ButtonText;
    }

    .consent-toggle > input[type="checkbox"]:checked + .consent-toggle__track .consent-toggle__thumb {
        background: HighlightText;
    }
}
