/* Interactive embedding: styles for the interactive block (Views/Partials/interactives/embed.cshtml) and the
   InteractiveFullscreen alt template. Loaded by _Layout.cshtml and InteractiveFullscreen.cshtml. */

/* ---- Block wrapper ------------------------------------------------------------------------- */
.fv-block { position: relative; margin: 2rem 0; background: #fff; }
.fv-block--full-bleed { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
/* 100vw includes the scrollbar; clip rather than hide so position: sticky keeps working. */
body:has(.fv-block--full-bleed) { overflow-x: clip; }

.fv-block--ratio-16-9 { aspect-ratio: 16 / 9; }
.fv-block--ratio-4-3 { aspect-ratio: 4 / 3; }
.fv-block--ratio-1-1 { aspect-ratio: 1 / 1; }

.fv-block iframe { display: block; width: 100%; border: 0; }
.fv-block--ratio-auto iframe { height: 600px; } /* replaced by height messaging */
.fv-block:not(.fv-block--ratio-auto) iframe { height: 100%; }
.fv-block:not(.fv-block--ratio-auto) { overflow: hidden; }

/* ---- Full screen ----------------------------------------------------------------------------- */
.fv-block__fullscreen {
  position: absolute; top: .5rem; right: .5rem; z-index: 3;
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .35rem .6rem; border: 1px solid rgba(0, 0, 0, .15); border-radius: 6px;
  background: rgba(255, 255, 255, .92); color: #0b0b0b; font: 600 .8125rem/1 "Roboto", system-ui, sans-serif;
  cursor: pointer; box-shadow: 0 1px 4px rgba(0, 0, 0, .1);
}
.fv-block__fullscreen:hover { background: #fff; }
/* The button gets its own strip so it never covers the interactive's title. */
.fv-block--fullscreen-button { padding-top: 2.75rem; }
.fv-block--fullscreen-button:not(.fv-block--ratio-auto) iframe { height: calc(100% - 2.75rem); }
.fv-block--fullscreen-button.is-fallback { padding-top: 0; }
.fv-block--fullscreen-button.is-fallback .fv-block__fullscreen { display: none; }
.fv-block__fullscreen:focus-visible { outline: 3px solid #cd001a; outline-offset: 2px; }
.fv-block:fullscreen { background: #fff; overflow: auto; }
.fv-block:fullscreen iframe { height: calc(100vh - 2.75rem); }
/* iPhone Safari has no element Fullscreen API: interactives.js falls back to a fixed overlay. */
.fv-block.fv-block--pseudo-fullscreen {
  position: fixed; inset: 0; z-index: 2000; width: auto; max-width: none; height: auto; margin: 0; aspect-ratio: auto; background: #fff; overflow: auto;
}
.fv-block--pseudo-fullscreen iframe { height: calc(100% - 2.75rem); }
html.fv-has-pseudo-fullscreen, html.fv-has-pseudo-fullscreen body { overflow: hidden; }
/* Ancestors with a z-index (e.g. the article column's .pull-up) would trap the overlay below the fixed site header. */
html.fv-has-pseudo-fullscreen :has(.fv-block--pseudo-fullscreen) { z-index: auto !important; }

/* ---- Mobile fallback ----------------------------------------------------------------------- */
.fv-block__fallback { display: none; }
.fv-block__fallback-link { display: block; text-decoration: none; color: inherit; border: 1px solid #e4e3de; border-radius: 8px; overflow: hidden; }
.fv-block__fallback-link img { display: block; width: 100%; height: auto; }
.fv-block__fallback-cta { display: block; padding: .75rem 1rem; font-weight: 700; color: #cd001a; }
/* Without JS, the default 576px breakpoint applies; interactives.js sets .is-fallback for custom ones. */
@media (max-width: 575.98px) {
  .fv-block--mobile-fallback:not(.fv-js) > :not(.fv-block__fallback) { display: none; }
  .fv-block--mobile-fallback:not(.fv-js) .fv-block__fallback { display: block; }
}
.fv-block.is-fallback { aspect-ratio: auto; height: auto !important; }
.fv-block.is-fallback > :not(.fv-block__fallback) { display: none !important; }
.fv-block.is-fallback .fv-block__fallback { display: block; }

.fv-block__missing { padding: 1rem; border: 1px dashed #c00; color: #c00; }

/* ---- Fullscreen landing template -------------------------------------------------------- */
.fv-fullscreen-page { margin: 0; font-family: "Roboto", system-ui, sans-serif; background: #fff; color: #0b0b0b; }
/* The back bar is exactly 3rem high (1.5rem line + .75rem margins), so a page-fill block can take the rest. */
.fv-fullscreen-page .fv-back {
  display: inline-block; margin: .75rem 1rem; line-height: 1.5rem; color: #cd001a; font-weight: 600; text-decoration: none;
}
.fv-fullscreen-page .fv-back:hover { text-decoration: underline; }
/* InteractiveFullscreen: one block filling the viewport below the back bar. */
.fv-fullscreen-page .fv-block--page-fill { margin: 0; height: calc(100vh - 3rem); height: calc(100dvh - 3rem); }
.fv-fullscreen-missing { padding: 2rem 1rem; }
