/* The practice-pack mixer, mounted by player.js. Colours come from the
   page's tokens (the portal's, or the dev harness's dark set). */
.practice-player { --pp-strip-bg: var(--surface, #1f2329); --pp-text: var(--text, #e8eaee); --pp-muted: var(--muted, #8b93a1); --pp-accent: var(--accent, #4fa3ff); --pp-border: var(--border, #3a414c); }
.practice-player .hidden { display: none !important; }
.practice-player .pp-status { color: var(--pp-muted); margin: 8px 0; }
.practice-player .pp-transport { display: flex; flex-direction: column; gap: 10px; background: var(--pp-strip-bg); padding: 10px 12px; border-radius: 8px; margin-bottom: 12px; }
/* The transport is the remote app's TransportBanner (remote_ui/lib/src/transport_banner.dart):
   the desktop bar's fixed palette and icon geometry, so it stays dark on the light portal theme. */
.practice-player .pp-transport-row { display: flex; align-items: center; gap: 8px; }
.practice-player .pp-transport-buttons { display: flex; gap: 8px; }
.practice-player .pp-transport-buttons button { width: 44px; height: 44px; padding: 0; background: #3a3a3a; border: 1px solid #5a5a5a; border-radius: 8px; }
.practice-player .pp-transport-buttons button:hover { border-color: #8c8c8c; }
.practice-player .pp-transport-buttons svg { display: block; width: 100%; height: 100%; }
.practice-player .pp-icon-play { fill: #00ff00; }
.practice-player .pp-icon-pause { fill: #ffa500; display: none !important; }
.practice-player #play.playing .pp-icon-play { display: none; }
.practice-player #play.playing .pp-icon-pause { display: block !important; }
.practice-player .pp-icon-stop { fill: #ff0000; }
.practice-player .pp-icon-record { fill: #646464; }
.practice-player .pp-time { flex: 0 0 148px; height: 44px; line-height: 42px; text-align: center; background: #3a3a3a; border: 1px solid #5a5a5a; border-radius: 8px; color: #dcdcdc; font: 24px/42px ui-monospace, Menlo, monospace; font-variant-numeric: tabular-nums; }
.practice-player .pp-seek-row { display: flex; align-items: center; gap: 8px; }
.practice-player .pp-seek-row .pp-fader { flex: 1 1 0; min-width: 0; }
.practice-player .pp-transport-status:not(:has(:not(:empty))) { display: none; }
/* The remote app's HorizontalFader (remote_ui/lib/src/horizontal_fader.dart) on a native range
   input, which keeps keyboard, touch and the `input` event. */
.practice-player { --fader-fill: #505055; --fader-handle: #8c8c8c; --fader-highlight: #dcdcdc; --fader-shadow: #505050; }
.practice-player .pp-fader { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 27px; margin: 0; background: none; cursor: pointer; touch-action: pan-y; --pos: 0; --fader-track: linear-gradient(to right, color-mix(in srgb, var(--fader-fill) 70%, transparent) calc(var(--pos) * 100%), #1e1e23 0); }
.practice-player .pp-fader::-webkit-slider-runnable-track { height: 23px; border-radius: 3px; background: var(--fader-track), #1e1e23; }
.practice-player .pp-fader::-moz-range-track { height: 23px; border-radius: 3px; background: var(--fader-track), #1e1e23; }
.practice-player .pp-fader::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 27px; margin-top: -2px; border: 0; border-radius: 2px; background: linear-gradient(var(--fader-highlight), var(--fader-highlight)) top / 100% 3px no-repeat, linear-gradient(var(--fader-shadow), var(--fader-shadow)) bottom / 100% 3px no-repeat, linear-gradient(#282828, #282828) center / 1.5px calc(100% - 8px) no-repeat, var(--fader-handle); }
.practice-player .pp-fader::-moz-range-thumb { width: 14px; height: 27px; border: 0; border-radius: 2px; background: linear-gradient(var(--fader-highlight), var(--fader-highlight)) top / 100% 3px no-repeat, linear-gradient(var(--fader-shadow), var(--fader-shadow)) bottom / 100% 3px no-repeat, linear-gradient(#282828, #282828) center / 1.5px calc(100% - 8px) no-repeat, var(--fader-handle); }
.practice-player button { font: inherit; font-size: 13px; background: var(--pp-strip-bg); color: var(--pp-text); border: 1px solid var(--pp-border); border-radius: 6px; padding: 6px 12px; cursor: pointer; }
.practice-player button:hover { border-color: var(--pp-accent); }
.practice-player button.on { background: var(--pp-accent); color: #0b1320; border-color: var(--pp-accent); }
.practice-player .pp-hint { color: var(--pp-muted); font-size: 12px; }
.practice-player .pp-picture { width: 100%; max-height: 40vh; background: #000; border-radius: 8px; display: block; margin-bottom: 12px; object-fit: contain; }
.practice-player .pp-pictures { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.practice-player .pp-strips { display: flex; flex-direction: column; background: var(--pp-strip-bg); border-radius: 8px; padding: 6px 0; }
.practice-player .pp-strips:empty { display: none; }
.practice-player .strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 12px; }
.practice-player .strip-label { flex: 0 0 104px; min-width: 0; }
.practice-player .strip-fader { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.practice-player .strip.muted .pp-fader { opacity: 0.3; }
.practice-player .name { font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.practice-player .role { font-size: 11px; color: var(--pp-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.practice-player .meter { height: 4px; background: rgb(0 0 0 / 45%); border-radius: 2px; overflow: hidden; }
.practice-player .meter-fill { height: 100%; width: 0; border-radius: 2px; }
.practice-player .buttons { flex: 0 0 72px; display: flex; gap: 4px; }
.practice-player .buttons button { width: 34px; height: 34px; padding: 0; }
.practice-player .mute.on { background: #ff5252; border-color: #ff5252; color: #1a0000; }
.practice-player .solo.on { background: #f5c242; border-color: #f5c242; color: #1a1200; }
.practice-player .error { flex: 1 0 100%; color: #ff7b7b; font-size: 11px; }
.practice-player .pp-details { margin-top: 12px; color: var(--pp-muted); font-size: 12px; }
.practice-player .pp-details pre { white-space: pre-wrap; font: 12px/1.4 ui-monospace, Menlo, monospace; background: var(--pp-strip-bg); padding: 10px; border-radius: 8px; max-height: 30vh; overflow: auto; }
.practice-player .pp-record.on .pp-icon-record, .practice-player .pp-record.recording .pp-icon-record { fill: #ff0000; }
.practice-player .pp-transport-buttons .pp-record.recording { border-color: #ff0000; box-shadow: 0 0 0 1px #ff0000; }
.practice-player .pp-record:disabled { opacity: 0.4; cursor: default; }
.practice-player #recordState:not(:empty) { font-variant-numeric: tabular-nums; }
.practice-player #recordState.pp-error { color: #ff7b7b; }
.practice-player #recordState.pp-recording { color: #ff5252; font-weight: 600; }
.practice-player .pp-takes-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 12px; }
.practice-player .pp-camera, .practice-player .pp-take { background: var(--pp-strip-bg); border-radius: 8px; padding: 8px; width: 256px; display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--pp-border); }
.practice-player .pp-camera video, .practice-player .pp-take video { width: 240px; height: 135px; background: #000; border-radius: 6px; object-fit: cover; display: block; }
.practice-player .pp-camera video { transform: scaleX(-1); }
.practice-player .pp-take.along { border-color: var(--pp-accent); }
.practice-player .pp-tile-label { font-size: 11px; color: var(--pp-muted); }
.practice-player .pp-take-actions { display: flex; gap: 4px; align-items: center; }
.practice-player .pp-take-actions button, .practice-player .pp-take-actions a { padding: 4px 8px; font-size: 12px; }
.practice-player .pp-take-actions a { color: var(--pp-text); text-decoration: none; border: 1px solid var(--pp-border); border-radius: 6px; }
.practice-player .pp-take-actions a:hover { border-color: var(--pp-accent); }
/* The stage: the pack's picture and the chosen take side by side, the same size; the take's
   tab collapses it to a sliver and the pack picture takes the row. The take has no controls
   of its own — the transport is the only clock. */
.practice-player .pp-stage { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; }
.practice-player .pp-pack-stage { flex: 1 1 0; min-width: 0; }
.practice-player .pp-stage .pp-picture { margin-bottom: 0; }
.practice-player .pp-take-stage { flex: 1 1 0; min-width: 0; display: flex; gap: 4px; align-items: stretch; }
.practice-player .pp-take-stage.collapsed { flex: 0 0 auto; }
.practice-player .pp-take-stage.collapsed .pp-take-stage-body { display: none; }
.practice-player .pp-take-stage-body { flex: 1 1 0; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; }
.practice-player .pp-take-window { flex: 1 1 calc(50% - 4px); min-width: 200px; display: flex; flex-direction: column; gap: 4px; }
.practice-player .pp-take-window:only-child { flex-basis: 100%; }
.practice-player .pp-take-window video { aspect-ratio: 16 / 9; }
.practice-player .pp-collapse { padding: 4px 6px; font-size: 16px; line-height: 1; min-height: 48px; }
.practice-player .pp-device { font-size: 11px; color: var(--pp-muted); display: flex; gap: 4px; align-items: center; }
.practice-player .pp-device select { font: inherit; font-size: 11px; flex: 1 1 0; min-width: 0; background: #0d0f12; color: var(--pp-text); border: 1px solid var(--pp-border); border-radius: 4px; padding: 2px 4px; }
.practice-player .pp-take { min-width: 256px; width: auto; max-width: 420px; }
.practice-player .pp-tile-status { font-size: 11px; color: var(--pp-muted); }
.practice-player .pp-tile-status.pp-error, .practice-player .pp-tile-label.pp-error { color: #ff7b7b; }
.practice-player .pp-take-actions { flex-wrap: wrap; }
.practice-player #audioHint:empty { display: none; }
.practice-player .pp-take-offset { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--pp-muted); }
.practice-player .pp-take-offset input { flex: 1 1 auto; min-width: 0; accent-color: var(--pp-accent); }
.practice-player .pp-take-offset output { min-width: 44px; text-align: right; font-variant-numeric: tabular-nums; color: var(--pp-text); }
