/* Immersive song practice: expand the YouTube iframe AND synchronized chords.
 * :fullscreen keeps the entire shell together; .tc-practice-expanded is the
 * viewport fallback used where arbitrary-element fullscreen is unavailable.
 */
html.tc-practice-fullscreen,
body.tc-practice-fullscreen { overscroll-behavior: none; }

.song_video .video_iframe.tc-practice-expanded,
.song_video .video_iframe.tc-practice-expanded.fixed,
.song_video .video_iframe.tc-practice-expanded.fixed.scrolling,
.song_video .video_iframe.tc-practice-expanded:fullscreen {
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-width: none !important;
  max-height: none !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: #000 !important;
  overflow: hidden !important;
  opacity: 1 !important;
  z-index: 2147483646 !important;
  transition: none !important;
}
.song_video .video_iframe.tc-practice-expanded iframe,
.song_video .video_iframe.tc-practice-expanded.fixed.scrolling iframe {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  border: 0 !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}
/* Preserve the existing karaoke/audio-only and ended-thumbnail modes. */
.song_video .video_iframe.tc-practice-expanded.kareoke iframe,
.song_video .video_iframe.tc-practice-expanded iframe.hidden {
  opacity: 0 !important;
  pointer-events: none !important;
}
.song_video .video_iframe.tc-practice-expanded .video_thumbnail {
  z-index: 1;
}
/* Fullscreen play-along: the dimming layer must fill the viewport,
   rather than leaving a small dark chord card in the centre. */
.song_video .video_iframe.tc-practice-expanded::before {
  content: "";
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, .58);
  z-index: 2;
  pointer-events: none;
}
.song_video .video_iframe.tc-practice-expanded span.overlay.chords {
  background: transparent !important;
  backdrop-filter: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
/* The dim layer is behind chords, but never blocks video controls. */

.song_video .video_iframe.tc-practice-expanded span.overlay.chords {
  z-index: 3 !important;
  max-width: min(92%, 700px);
  pointer-events: none;
}
.song_video .video_iframe.tc-practice-expanded .tucuatro_controls {
  position: fixed !important;
  left: 50% !important;
  right: auto !important;
  bottom: max(12px, env(safe-area-inset-bottom)) !important;
  transform: translateX(-50%) !important;
  z-index: 5 !important;
  width: min(660px, calc(100% - 16px));
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 !important;
  border-radius: 14px;
}
.video_iframe .tucuatro_controls .tc-practice-fullscreen {
  width: 44px;
  height: 44px;
  min-width: 44px;
  flex: 0 0 44px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin: 0;
  padding: 10px;
  font: inherit;
  font-size: 18px;
  color: #fea02f;
  cursor: pointer;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.12);
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
}
.video_iframe .tucuatro_controls .tc-practice-fullscreen:focus-visible {
  outline: 3px solid #fea02f;
  outline-offset: 2px;
}
.video_iframe .tucuatro_controls .tc-practice-fullscreen[aria-pressed="true"] {
  color: #fff;
  background: #303030;
  border-color: #fea02f;
}
.video_iframe .tucuatro_controls .tc-practice-fullscreen:disabled {
  opacity: .65;
  cursor: progress;
}
body.tc-practice-fullscreen #tucuatro-recenter { display: none !important; }
@media (min-width: 768px) and (min-height: 600px) {
  .song_video .video_iframe.tc-practice-expanded span.overlay.chords {
    zoom: 1.2;
  }
}
@media (max-width: 600px) {
  .song_video .video_iframe.tc-practice-expanded .tucuatro_controls {
    padding: 6px 8px;
    padding-bottom: calc(6px + env(safe-area-inset-bottom));
  }
  .song_video .video_iframe.tc-practice-expanded .tucuatro_controls i,
  .song_video .video_iframe.tc-practice-expanded .tucuatro_controls .tc-practice-fullscreen {
    width: 40px;
    min-width: 40px;
    height: 40px;
    padding: 8px;
    flex-basis: 40px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .song_video .video_iframe.tc-practice-expanded,
  .song_video .video_iframe.tc-practice-expanded * { transition: none !important; }
}
