/* Big-screen projection player for songs.
 *
 * A fullscreen overlay that shows one lyric line at a time (up to two tracks:
 * a top row and a bottom row), driven by the audio clock. The three themes
 * mirror the lineup presentation themes so a projected song reads as a sibling
 * of a projected lineup:
 *   [data-theme="default"] → Blue   (bb-slides.png background, white text)
 *   [data-theme="nb"]      → White  (#f8f9fa background, dark text)
 *   [data-theme="nb_logo"] → White + language wordmark watermark
 * (tokens taken from presentation.js.css / presentation.nb.js.css /
 *  presentation.logo.js.css).
 */

.song-projection {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  flex-direction: column;
  overflow: hidden;
}

.song-projection--open {
  display: flex;
}

/* Hide the mouse cursor once the controls have auto-hidden. */
.song-projection--idle {
  cursor: none;
}

/* ---- Themes -------------------------------------------------------------- */

.song-projection[data-theme="default"] {
  background: url("/static/images/bb-slides.png") center center / cover no-repeat;
  color: #ffffff;
}

.song-projection[data-theme="nb"],
.song-projection[data-theme="nb_logo"] {
  background-color: #f8f9fa;
  color: #333333;
}

/* Language-aware wordmark, top-left, only on the white+logo theme. The URL is
 * supplied per request via --bb-presentation-logo (built from the page
 * language), exactly like presentation.logo.js.css. */
.song-projection__logo {
  display: none;
  position: absolute;
  left: 24px;
  top: 24px;
  width: 200px;
  height: 52px;
  background: var(--bb-presentation-logo, none) left top / contain no-repeat;
  opacity: 0.9;
  pointer-events: none;
}

.song-projection[data-theme="nb_logo"] .song-projection__logo {
  display: block;
}

/* ---- Stage / lines ------------------------------------------------------- */

.song-projection__stage {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6vh 6vw;
  cursor: pointer; /* click anywhere to play/pause */
}

.song-projection__lines {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3vh;
  width: 100%;
  max-width: 90vw;
  text-align: center;
}

.song-projection__line {
  width: 100%;
  line-height: 1.25;
  overflow-wrap: anywhere;
  transition: opacity 0.18s ease;
}

/* Empty / disabled slots collapse so a single-track view stays vertically
 * centered. */
.song-projection__line:empty {
  display: none;
}

.song-projection__line--top {
  font-size: clamp(2.2rem, 6.5vw, 7rem);
  font-weight: 700;
}

.song-projection__line--bottom {
  font-size: clamp(1.6rem, 4.5vw, 5rem);
  font-weight: 500;
  opacity: 0.92;
}

/* Brief fade when the active line changes. */
.song-projection__line.is-changing {
  opacity: 0;
}

/* ---- Controls (auto-hiding) --------------------------------------------- */

.song-projection__controls {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 18px;
  max-width: 96vw;
  padding: 10px 16px;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.62);
  color: #ffffff;
  backdrop-filter: blur(6px);
  transition: opacity 0.25s ease;
}

.song-projection--idle .song-projection__controls {
  opacity: 0;
  pointer-events: none;
}

.song-projection__controls-group {
  display: flex;
  align-items: center;
  gap: 8px 12px;
  flex-wrap: wrap;
}

.song-projection__controls label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.song-projection__controls select {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 13px;
}

.song-projection__controls select option {
  color: #111111; /* readable in the native dropdown popup */
}

.song-projection__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border: none;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.song-projection__btn:hover {
  background: rgba(255, 255, 255, 0.28);
}

/* ---- Trigger button on the song page ------------------------------------ */

.song-projection-open {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
