/* HH | Oct 2026 | Consent overlay for YouTube/Vimeo embeds (see _files/js/video-consent.js) */
.video-consent {
    container-type: inline-size;
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    justify-content: safe center;
    gap: clamp(.5rem, 3%, 1rem);
    padding: clamp(.75rem, 4%, 1.5rem);
    overflow-y: auto;
    background-color: rgba(0, 0, 0, .85);
    color: #fff;
    font-family: Figtree, sans-serif;
    text-align: center;
    cursor: default;
}

.video-consent .video-consent__text {
    max-width: 32rem;
    margin: 0;
    font-size: 1.125rem;
    line-height: 1.4;
}

.video-consent__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .75rem;
}

/* Buttons mirror the design system's .button.button--inverse / .button--white
   (smaller text). Selectors are deliberately specific: inside WYSIWYG content
   the site's .text-content .button / .text-content a rules would otherwise
   override colours, add margins and turn the link black */
.video-consent .video-consent__actions .video-consent__button.button {
    margin: 0;
    border: .125rem solid #c8102e;
    padding-block: .5rem;
    padding-inline: 1.5625rem;
    font-size: 1rem;
    line-height: 1.6;
    letter-spacing: .0625rem;
}

.video-consent .video-consent__actions .video-consent__button.button.button--inverse {
    background-color: #c8102e;
    color: #fff;
}

.video-consent .video-consent__actions .video-consent__button.button.button--inverse:hover,
.video-consent .video-consent__actions .video-consent__button.button.button--inverse:focus-visible {
    background-color: #fff;
    color: #000;
}

.video-consent .video-consent__actions .video-consent__button.button.button--white {
    border-color: #fff;
    background-color: #fff;
    color: #000;
}

.video-consent .video-consent__actions .video-consent__button.button.button--white:hover,
.video-consent .video-consent__actions .video-consent__button.button.button--white:focus-visible {
    background-color: #c8102e;
    color: #fff;
}

.video-consent a.video-consent__link {
    margin: 0;
    color: #fff;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: #c8102e;
    text-decoration-thickness: .125rem;
    text-underline-offset: .25rem;
    transition: .3s text-decoration-color ease-in-out;
}

.video-consent a.video-consent__link:hover,
.video-consent a.video-consent__link:focus-visible {
    color: #fff;
    text-decoration-color: #fff;
}

.video-consent a.video-consent__link:focus-visible {
    outline: .1875rem solid #fff;
    outline-offset: .1875rem;
}

/* Homepage hero: same layer as the hero title (z-index 2), which comes later
   in the page and so stays on top; hide the play/pause button (z-index 100)
   while the overlay is open */
.home-hero__main-content-media-outer-wrap > .video-consent {
    z-index: 2;
}

.home-hero__main-content-media-outer-wrap:has(> .video-consent) .home-hero__media-play-pause-button {
    visibility: hidden;
}

/* Editor-pasted iframes: wrapper sized by the iframe, overlay on top */
.video-consent-frame {
    position: relative;
    display: inline-block;
    max-width: 100%;
    vertical-align: top;
    background: #000 center / cover no-repeat;
}

.video-consent-frame > iframe {
    vertical-align: top;
}

.video-consent-frame--gated > iframe {
    visibility: hidden;
}

/* Narrow embeds (sidebars, small cards, phones) */
@container (max-width: 30rem) {
    .video-consent .video-consent__text {
        font-size: .875rem;
    }

    .video-consent__actions {
        gap: .5rem;
    }

    .video-consent .video-consent__actions .video-consent__button.button {
        font-size: .875rem;
    }

    .video-consent a.video-consent__link {
        font-size: .875rem;
    }
}

/* Phone-width embeds: keep text, both buttons and the link visible without scrolling */
@container (max-width: 20rem) {
    .video-consent .video-consent__text {
        font-size: .8125rem;
        line-height: 1.3;
    }

    .video-consent .video-consent__actions .video-consent__button.button {
        font-size: .8125rem;
        line-height: 1.4;
        letter-spacing: 0;
        padding-block: .125rem;
        padding-inline: .5rem;
    }

    .video-consent a.video-consent__link {
        font-size: .8125rem;
        text-underline-offset: .1875rem;
    }
}

/* Homepage hero: self-hosted background video (see the hero section at the end
   of video-consent.js). Mirrors the Vimeo iframe rules in style.min.css:
   desktop only, fades in over the hero image once playing. No consent needed */
.home-hero__main-content-media .home-hero__video {
    display: none;
}

@media screen and (min-width: 1024px) {
    .home-hero__main-content-media .home-hero__video {
        display: block;
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        opacity: 0;
        transition: .3s opacity ease-in-out;
        pointer-events: none;
    }

    .home-hero__main-content-media.video-playing .home-hero__video {
        opacity: 1;
    }
}

.home-hero__media-play-pause-button[hidden] {
    display: none !important;
}