/* ============================================================
   YouTube / OneTrust GDPR Consent Styles  — Common
   Covers: youtubeVideoDiv components, blog/news RTE iframes,
           modal #myModalResultCustomer
   Adjust path to match your Sitecore theme folder structure.
   ============================================================ */

/* ---- Block YouTube iframe until consent ---- */

iframe.youtube-gdpr-pending {
    display: none;
}

/* ---- Generic wrapper injected around bare RTE iframes ---- */

.gdpr-youtube-container {
    /* position: relative;
    display: block; */
    display: initial;
    width: 100%;
    max-width: 100%;
}

/* ---- GDPR placeholder box ---- */

.gdpr-info-box {
    /* Hidden by default; .is-visible switches to flex */
    display: none;

    /* Sizing: match 16:9 YouTube embed, fill available width */
    box-sizing: border-box;
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 180px;
    padding: 1.5rem;

    /* Flexbox: center content on both axes */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;

    /* Visual */
    background: #1a1a1a;
    color: #ffffff;

    /* Typography reset — prevent page-level font inheritance issues */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
                 Helvetica, Arial, sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    text-align: center;
    letter-spacing: normal;

    /* Keep placeholder above poster overlays and clickable */
    position: relative;
    z-index: 5;
    pointer-events: auto;
}

.gdpr-info-box * {
    pointer-events: auto;
}

.gdpr-info-box.is-visible {
    display: flex;
}

/* Warning text container */
#ot-warning-text {
    margin: 0;
}

.gdpr-info-box .title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 0.375rem;
    color: #ffffff;
}

.gdpr-info-box .desc {
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.5;
    margin: 0;
    color: #cccccc;
}

/* "Update your cookie settings" button */
#ot-settings-btn {
    margin-top: 1rem;
}

.gdpr-info-box .btn.btn-tertiary {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    border: 1px solid #ffffff;
    border-radius: 2px;
    background: transparent;
    color: #ffffff;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.4;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.gdpr-info-box .btn.btn-tertiary:hover,
.gdpr-info-box .btn.btn-tertiary:focus {
    background: #ffffff;
    color: #1a1a1a;
    outline: none;
}

/* ---- Thumbnail overlay: hide when YouTube is blocked ---- */

/* Pattern 1: dedicated background wrapper (Quote Detail / Partner pages) */
.quote-detail-video-background.gdpr-hidden {
    display: none;
}

/* Pattern 2: poster img or its parent wrapper (Sustainability / generic pages) */
img[alt="poster video"].gdpr-hidden,
.gdpr-youtube-container > *:not(.gdpr-info-box):not(iframe).gdpr-hidden {
    display: none;
}

/* Fallback: any element marked as gdpr-hidden inside video containers stays hidden */
.gdpr-youtube-container .gdpr-hidden,
.youtubeVideoDiv .gdpr-hidden {
    display: none !important;
}

/* ---- Modal (#myModalResultCustomer) overrides ---- */

#myModalResultCustomer .gdpr-info-box.modal-gdpr-box,
#proudModal .gdpr-info-box.modal-gdpr-box {
    /* Modal iframe may not fill 16:9, use min-height as floor */
    aspect-ratio: unset;
    min-height: 240px;
    width: 100%;
    height: 100%;
}

