/* Film — player, telestration surface, marks.
   Inherits every colour token from app.css. */

.no-scroll { overflow: hidden; }

/* --- upload row ---------------------------------------------------- */

.film-upload { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }

.select {
  flex: 1 1 180px;
  min-width: 160px;
  padding: 8px 11px;
  background: var(--field);
  border: 1px solid var(--panel-2);
  border-radius: var(--r);
  color: var(--cream);
  font-family: var(--body);
  font-size: 14px;
}
.select:focus { outline: none; border-color: var(--gold); }

.progress {
  height: 3px;
  background: var(--panel-2);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 14px;
}
.progress > div {
  height: 100%;
  width: 0;
  background: var(--gold);
  transition: width .15s linear;
}

/* --- film list ----------------------------------------------------- */

.film-list { list-style: none; margin: 0; padding: 0; }

.film-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(35,35,35,.9);
}
.film-row:last-child { border-bottom: 0; }

.film-title { font-size: 15px; color: var(--cream); }
.film-sub {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--dim);
  margin-top: 2px;
}
.film-right { display: flex; align-items: center; gap: 10px; }

.chip {
  padding: 3px 8px;
  border: 1px solid var(--panel-2);
  border-radius: 100px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--dim);
  white-space: nowrap;
}
.chip--wait { border-color: var(--gold); color: var(--gold); }

/* --- player -------------------------------------------------------- */

#player {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--field);
  overflow-y: auto;
}

.player__bar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  background: var(--panel);
  border-bottom: 1px solid var(--panel-2);
}
.player__id { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.player__title {
  font-family: var(--display);
  font-size: 16px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--cream);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.player__who { font-family: var(--mono); font-size: 11.5px; color: var(--gold); white-space: nowrap; }

.player__body { max-width: 900px; margin: 0 auto; padding: 18px 20px 60px; }

/* The stage holds video and canvas in exact register. aspect-ratio is
   set from the clip's own dimensions once metadata loads, so the canvas
   never sits over letterbox bars. */
.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid var(--panel-2);
  border-radius: var(--r);
  overflow: hidden;
  touch-action: none;
}
.stage video,
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage video { object-fit: contain; }
.stage canvas { cursor: crosshair; }

/* --- transport ----------------------------------------------------- */

.transport {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--panel);
  border: 1px solid var(--panel-2);
  border-radius: var(--r);
  flex-wrap: wrap;
}

.t-btn {
  padding: 7px 11px;
  background: var(--field);
  border: 1px solid var(--panel-2);
  border-radius: var(--r);
  color: var(--cream);
  font-family: var(--mono);
  font-size: 12px;
  cursor: pointer;
}
.t-btn:hover { border-color: var(--gold); }
.t-btn--main {
  font-family: var(--display);
  letter-spacing: .1em;
  text-transform: uppercase;
  min-width: 74px;
}

#t-scrub {
  flex: 1 1 160px;
  min-width: 120px;
  accent-color: var(--gold);
}

.t-time { font-family: var(--mono); font-size: 11.5px; color: var(--dim); white-space: nowrap; }

.speeds { display: flex; gap: 4px; }
.speed {
  padding: 5px 8px;
  background: none;
  border: 1px solid var(--panel-2);
  border-radius: var(--r);
  color: var(--dim);
  font-family: var(--mono);
  font-size: 11px;
  cursor: pointer;
}
.speed.is-active { border-color: var(--gold); color: var(--gold); }

/* --- telestration tools -------------------------------------------- */

.mark-tools {
  margin-top: 12px;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--panel-2);
  border-radius: var(--r);
}
.tool-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tool-row + .tool-row { margin-top: 10px; }

.tools { display: flex; gap: 4px; flex-wrap: wrap; }
.tool {
  padding: 6px 11px;
  background: var(--field);
  border: 1px solid var(--panel-2);
  border-radius: var(--r);
  color: var(--dim);
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}
.tool.is-active { border-color: var(--gold); color: var(--gold); }

.colors { display: flex; gap: 5px; margin-left: auto; }
.swatch {
  width: 22px;
  height: 22px;
  border: 2px solid transparent;
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
}
.swatch.is-active { border-color: var(--cream); }

.mark-input {
  flex: 1 1 200px;
  min-width: 140px;
  padding: 8px 11px;
  background: var(--field);
  border: 1px solid var(--panel-2);
  border-radius: var(--r);
  color: var(--cream);
  font-family: var(--body);
  font-size: 14px;
}
.mark-input:focus { outline: none; border-color: var(--gold); }

/* --- marks list ---------------------------------------------------- */

.marks { margin-top: 22px; }
.marks h3 {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--dim);
}

.mark-list { list-style: none; margin: 0; padding: 0; }
.mark-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(35,35,35,.9);
}
.mark-row:last-child { border-bottom: 0; }

.mark-ts {
  padding: 4px 9px;
  background: var(--field);
  border: 1px solid var(--panel-2);
  border-radius: var(--r);
  color: var(--gold);
  font-family: var(--mono);
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}
.mark-ts:hover { border-color: var(--gold); }

.mark-note { flex: 1; font-size: 14.5px; color: var(--cream); }

/* --- voice notes --------------------------------------------------- */

/* Recording is a state you must not lose track of — a coach who thinks
   they stopped and didn't will record the rest of the session. */
#rec-toggle.is-rec {
  border-color: #B4462F;
  color: #F3B7C0;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .55; } }

.rec-row { min-height: 0; }
.rec-row:empty { display: none; }

.rec-state {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .06em;
  color: var(--gold);
}

.linkish--inline {
  display: inline;
  width: auto;
  margin: 0 0 0 12px;
  font-size: 12.5px;
}

.mark-audio-btn {
  padding: 4px 10px;
  background: var(--field);
  border: 1px solid var(--gold);
  border-radius: 100px;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 11.5px;
  cursor: pointer;
  white-space: nowrap;
}
.mark-audio-btn:hover { background: rgba(201,168,76,.12); }

#mark-audio { display: none; }

.mark-del {
  background: none;
  border: 0;
  color: var(--dim);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}
.mark-del:hover { color: #B4462F; }

@media (max-width: 520px) {
  .player__body { padding: 14px 14px 48px; }
  .player__bar { padding: 12px 14px; }
  .colors { margin-left: 0; }
}
