/* Shared YouTube player dialog — used on the public site and in the dashboard. */
.yt-modal-open { overflow: hidden; }
.yt-modal { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; padding: clamp(.75rem, 3vw, 2rem); }
.yt-modal[hidden] { display: none; }
.yt-modal-backdrop { position: absolute; inset: 0; background: rgba(5, 6, 8, .88); opacity: 0; transition: opacity .25s ease; }
.yt-modal.is-open .yt-modal-backdrop { opacity: 1; }
.yt-modal-dialog {
  position: relative; width: min(1200px, 100%); max-height: 100%; display: flex; flex-direction: column;
  background: #111216; color: #F5F5F5; border: 1px solid #30333A; border-radius: 14px; overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.6); transform: translateY(12px) scale(.98); opacity: 0;
  transition: transform .28s cubic-bezier(.2,.7,.2,1), opacity .28s ease;
}
.yt-modal.is-open .yt-modal-dialog { transform: none; opacity: 1; }
.yt-modal-dialog:focus { outline: none; }
.yt-modal.is-vertical .yt-modal-dialog { width: min(440px, 100%, calc((100vh - 9rem) * 9 / 16)); }
.yt-modal-head { display: flex; align-items: center; gap: 1rem; padding: .75rem .75rem .75rem 1.25rem; border-bottom: 1px solid #30333A; }
.yt-modal-title { flex: 1; min-width: 0; margin: 0; font-size: 1rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yt-modal-external { color: #A8ADB7; font-size: .85rem; white-space: nowrap; }
.yt-modal-external:hover { color: #fff; }
.yt-modal-close { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid #30333A; background: transparent; color: #F5F5F5; }
.yt-modal-close:hover { background: #F5F5F5; color: #111216; }
.yt-modal-close:focus-visible, .yt-modal-external:focus-visible, .yt-modal-manual:focus-visible { outline: 2px solid #FF3B4A; outline-offset: 2px; }
.yt-modal-stage { position: relative; aspect-ratio: 16 / 9; background: #000; }
.yt-modal.is-vertical .yt-modal-stage { aspect-ratio: 9 / 16; }
.yt-modal-player, .yt-modal-player iframe, .yt-modal-stage > iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-modal-manual {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2;
  display: inline-flex; align-items: center; gap: .6rem; padding: .9rem 1.4rem; border: 0; border-radius: 6px;
  background: #EB001C; color: #fff; font-weight: 600; font-size: 1rem; box-shadow: 0 10px 30px rgba(0,0,0,.5);
}
.yt-modal-error { position: absolute; inset: auto 1rem 1rem; z-index: 2; margin: 0; padding: .75rem 1rem; border-radius: 8px; background: rgba(17,18,22,.92); color: #F5F5F5; font-size: .9rem; text-align: center; }
@media (max-width: 575.98px) {
  .yt-modal { padding: 0; }
  .yt-modal-dialog { border-radius: 0; height: 100%; justify-content: center; border: 0; }
  .yt-modal.is-vertical .yt-modal-dialog { width: 100%; }
  .yt-modal-stage { max-height: calc(100vh - 64px); }
  .yt-modal.is-vertical .yt-modal-stage { aspect-ratio: auto; height: calc(100vh - 64px); }
  .yt-modal-external { display: none; }
}
@media (prefers-reduced-motion: reduce) { .yt-modal-backdrop, .yt-modal-dialog { transition: none; } }
