/* 🎬 VIDEO LESSONS (js/lessons.js, 2026-09-27): the library, the player, and
   the two doors (the menu's, and the piece page's). */

/* ------------------------------------------------------------ the doors */
/* a row of its own under MY PLAN and MY SHEET MUSIC: three labels do not fit
   a phone's row, and the keybed below is one octave and stays seven */
.menu-under > #videos-btn.mode-btn { grid-column: span 6; border-color: rgba(255, 140, 158, .5); }
html[data-menu="stage"] #menu .menu-under > #videos-btn.mode-btn,
html[data-menu="stage"] #menu .menu-under:has(> #atlantis-btn.hidden) > #videos-btn.mode-btn {
  grid-column: span 6; border-color: rgba(255, 140, 158, .5); color: #ffe3e8;
}
/* on the piece's page it leads the modes, across the grid */
.pp-mode-grid > #song-lesson-btn { grid-column: 1 / -1; border-color: rgba(255, 140, 158, .55); color: #ffe3e8; }
.pp-mode-grid > #song-lesson-btn .vls-len {
  margin-left: 6px; padding: 2px 8px; border-radius: 999px; font-size: 11px; letter-spacing: .3px;
  background: rgba(255, 140, 158, .16); color: #ffd0d8;
}
/* the offer's one row that is a door */
.pm-benefits li.pm-door { cursor: pointer; border-radius: 8px; outline: 1px dashed rgba(255, 140, 158, .0); }
.pm-benefits li.pm-door b { text-decoration: underline; text-decoration-color: rgba(255, 140, 158, .7); text-underline-offset: 3px; }
.pm-benefits li.pm-door:hover b, .pm-benefits li.pm-door:focus-visible b { color: #ffb3c0; }

/* ------------------------------------------------------------ the library */
#vls-screen { z-index: 12; }
.vls-panel { max-width: 860px; width: min(860px, 100%); text-align: left; padding: 18px 20px 40px; }
/* the heading is centred, as every screen's is: the Back button floats over
   the panel's top left corner (.back-bar has no height of its own) */
.vls-title { margin: 6px 0 2px; font-size: 28px; letter-spacing: 2px; color: #ffb3c0; text-align: center; }
.vls-sub { margin: 0 0 14px; font-size: 13px; color: #b9b4c6; text-align: center; }
.vls-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.vls-tools #vls-q {
  flex: 1 1 240px; min-width: 0; height: 40px; padding: 0 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .16); color: #fff; font-size: 15px;
}
.vls-tools .seg { flex: 0 0 auto; }
.vls-only { margin: 6px 0 2px; font-size: 13px; color: #e9e4f6; }
#vls-letters { margin: 8px 0 4px; }
.vls-chapter {
  margin: 18px 0 4px; font-size: 12px; letter-spacing: 2.5px; font-weight: 900; color: var(--gold, #ffd75e); text-transform: uppercase;
}
.vls-chapter span { margin-left: 8px; font-size: 12px; letter-spacing: 0; text-transform: none; font-weight: 600; color: #b9b4c6; }
.vls-row {
  display: grid; grid-template-columns: 38px minmax(0, 1fr) auto auto; gap: 4px 12px; align-items: center;
  margin: 6px 0; padding: 10px 12px; border-radius: 12px; cursor: pointer;
  background: rgba(255, 255, 255, .045); border: 1px solid rgba(255, 255, 255, .1);
}
.vls-row:hover, .vls-row:focus-visible { border-color: #ff8c9e; background: rgba(255, 140, 158, .08); outline: none; }
.vls-play {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 140, 158, .18); color: #ffb3c0; font-size: 13px; padding-left: 2px;
}
.vls-what { min-width: 0; }
.vls-what b { display: block; font-size: 15.5px; color: #fff; overflow-wrap: anywhere; }
.vls-what i { display: block; font-style: normal; font-size: 12px; color: #a9a4b8; }
.vls-time { text-align: right; font-variant-numeric: tabular-nums; font-size: 14px; color: #e9e4f6; white-space: nowrap; }
.vls-time i { display: block; font-style: normal; font-size: 11px; color: #a9a4b8; }
.vls-piece {
  min-height: 36px; max-width: 230px; padding: 5px 12px; border-radius: 10px; cursor: pointer; text-align: left;
  background: rgba(52, 211, 255, .1); border: 1px solid rgba(52, 211, 255, .45); color: #bff0ff; font: 800 12.5px/1.2 inherit;
}
.vls-piece i { display: block; font-style: normal; font-weight: 600; font-size: 11px; color: #9fd6e6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vls-piece:hover { background: rgba(52, 211, 255, .2); }
.vls-piece.none { border: 0; background: none; min-height: 0; padding: 0; }
.vls-row.vls-jumped { animation: fp-jumped 1.1s ease-out 1; }

/* ------------------------------------------------------------ the player */
#vls-player { z-index: 14; background: rgba(3, 3, 8, .9); padding: 12px; }
.vls-box { width: min(1100px, 100%); display: flex; flex-direction: column; gap: 10px; align-items: center; }
.vls-head { width: 100%; display: flex; align-items: baseline; gap: 12px; color: #fff; }
.vls-head b { font-size: 18px; min-width: 0; overflow-wrap: anywhere; }
.vls-head span { flex: 1 1 auto; font-size: 12.5px; color: #b9b4c6; }
#vls-close {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .2); color: #fff; font-size: 16px;
}
/* the recording's own shape, as large as the window allows in both directions */
.vls-frame {
  --vls-ar: 16 / 9;
  aspect-ratio: var(--vls-ar); width: min(100%, calc((100dvh - 190px) * (16 / 9)));
  max-height: calc(100dvh - 190px); border-radius: 12px; overflow: hidden; background: #000;
  display: grid; place-items: center;
}
.vls-frame.tall { width: auto; height: calc(100dvh - 190px); max-width: 100%; }
.vls-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.vls-say { padding: 20px; text-align: center; color: #e9e4f6; max-width: 460px; }
.vls-say p { margin: 0 0 14px; font-size: 15px; line-height: 1.45; }
.vls-foot { width: 100%; display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; }
.vls-foot .small-btn { margin: 0; min-height: 40px; }
.vls-foot .vls-piece { max-width: 300px; }

@media (max-width: 620px) {
  .vls-panel { padding: 12px 12px 40px; }
  .vls-title { font-size: 22px; }
  /* the piece's door drops under the lesson it belongs to */
  .vls-row { grid-template-columns: 38px minmax(0, 1fr) auto; }
  .vls-row .vls-piece { grid-column: 2 / -1; justify-self: start; max-width: 100%; }
  .vls-row .vls-piece.none { display: none; }
  .vls-head b { font-size: 15.5px; }
}
