/* One focused viewing layer shared by the library and homepage. */
.bb-video-modal, .bb-video-modal * { box-sizing: border-box; }
dialog.bb-video-modal { position: fixed; inset: 0; width: min(720px, calc(100vw - 40px)); max-width: none; height: auto; max-height: calc(100dvh - 32px); margin: auto; padding: 0; overflow: auto; border: 0; border-radius: 16px; background: #f3f6f7; color: #29343b; box-shadow: 0 24px 80px rgba(18, 29, 37, .3); font: 400 14px/1.5 "Manrope", sans-serif; overscroll-behavior: contain; }
dialog.bb-video-modal:not([open]) { display: none; }
.bb-video-modal::backdrop { background: rgba(18, 29, 37, .76); }
.bb-video-modal__panel { padding: 20px 24px 22px; }
.bb-video-modal__header { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 20px; margin: 0 0 16px; }
.bb-video-modal h2.bb-video-modal__title { margin: 0; padding-top: 6px; color: #29343b; font: 600 clamp(24px, 2.4vw, 30px)/1.12 "Cormorant Garamond", serif; letter-spacing: -.02em; text-wrap: balance; overflow-wrap: break-word; }
.bb-video-modal button.bb-video-modal__close { display: inline-flex; flex: none; align-items: center; justify-content: center; gap: 8px; width: auto; min-width: 84px; min-height: 44px; height: 44px; margin: 0; padding: 0 12px; border: 1px solid #667984; border-radius: 999px; background: #fcfbf8; color: #29343b; box-shadow: none; font: 750 13px/1 "Manrope", sans-serif; letter-spacing: 0; text-transform: none; cursor: pointer; }
.bb-video-modal button.bb-video-modal__close:hover { background: #dce6ea; }
.bb-video-modal button.bb-video-modal__close:focus-visible { outline: 3px solid #4d5871; outline-offset: 3px; }
.bb-video-modal__close svg { display: block; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.bb-video-modal__content { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.bb-video-modal__screen { position: relative; width: min(100%, 420px, calc((100dvh - 225px) * .8)); aspect-ratio: 4 / 5; flex: none; overflow: hidden; border-radius: 10px; background: #29343b; }
.bb-video-modal__screen iframe { position: absolute; inset: 0; display: block; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; border-radius: 0; }
.bb-video-modal__details { max-width: 100%; text-align: center; }
.bb-video-modal p.bb-video-modal__meta { margin: 0; color: #45545f; font: 600 12px/1.5 "Manrope", sans-serif; font-variant-numeric: tabular-nums; }
.bb-video-modal p.bb-video-modal__captions { margin: 4px 0 0; color: #45545f; font: 400 12px/1.5 "Manrope", sans-serif; }
.bb-video-modal [hidden] { display: none !important; }
@media (max-width: 680px) {
  dialog.bb-video-modal { width: 100%; height: 100dvh; max-height: 100dvh; max-width: 100%; border: 0; border-radius: 0; }
  .bb-video-modal__panel { display: flex; flex-direction: column; min-height: 100%; padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
  .bb-video-modal__header { gap: 12px; margin-bottom: 18px; }
  .bb-video-modal h2.bb-video-modal__title { font-size: 25px; line-height: 1.12; }
  .bb-video-modal button.bb-video-modal__close { min-width: 80px; padding-inline: 10px; }
  .bb-video-modal__content { justify-content: center; flex: 1; }
  .bb-video-modal__screen { width: min(100%, calc((100dvh - 240px) * .8)); }
}
@media (max-height: 500px) and (min-width: 681px) {
  dialog.bb-video-modal { width: min(860px, calc(100vw - 32px)); }
  .bb-video-modal__screen { width: min(100%, calc((100dvh - 180px) * .8)); }
  .bb-video-modal__panel { padding: 12px 20px; }
  .bb-video-modal__header { margin-bottom: 8px; }
  .bb-video-modal h2.bb-video-modal__title { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .bb-video-modal, .bb-video-modal * { scroll-behavior: auto !important; transition: none !important; }
}
