/* SwingCheck AI — authenticated app additions (platform/app.html). Same approved tokens as
   sc_platform.css / sc_athlete.css: cobalt #1029B8, yellow #FFF000, white surfaces, no orange. */

/* sign-in + full-page states */
.ap-signin { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: linear-gradient(180deg, #f6f8ff, #eef2fc); }
.ap-signin-card { width: min(440px, 100%); background: #fff; border: 1px solid var(--sc-line); border-radius: 22px; box-shadow: var(--sc-shadow); padding: 28px 26px; }
.ap-signin-card h2 { margin: 6px 0 8px; font-size: 22px; color: var(--sc-ink); }
.ap-brand b { display: block; font: italic 900 30px/1 var(--sc-logo); color: var(--sc-cobalt); letter-spacing: -.01em; }
.ap-brand b i { color: var(--sc-yellow); -webkit-text-stroke: .6px var(--sc-yellow-edge); margin-left: 5px; }
.ap-brand small { display: block; margin-top: 6px; font: 800 10px var(--sc-font); letter-spacing: .12em; color: var(--sc-ink); }
.ap-austin { display: flex; gap: 12px; align-items: center; margin: 18px 0 6px; padding: 12px; border-radius: 14px; background: var(--sc-cobalt-soft); }
.ap-austin img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; background: #fff; flex: none; }
.ap-austin p { margin: 0; color: var(--sc-ink); font-weight: 600; font-size: 15px; }
.ap-form { display: grid; gap: 12px; margin-top: 14px; }
.ap-form label { display: grid; gap: 5px; font: 600 13.5px var(--sc-font); color: var(--sc-slate); }
.ap-form input, .ap-form select, .ap-form textarea { font: 500 16px var(--sc-font); color: var(--sc-ink); border: 1px solid #cdd3e1; border-radius: 12px; padding: 11px 12px; background: #fff; min-height: 44px; }
.ap-form input:focus, .ap-form select:focus, .ap-form textarea:focus { outline: 3px solid rgba(16, 41, 184, .25); border-color: var(--sc-cobalt); }
.ap-form input[readonly], .ap-form select:disabled { background: #f4f6fb; color: var(--sc-slate); }
.ap-grid { grid-template-columns: 1fr 1fr; }
.ap-full { grid-column: 1 / -1; }
.ap-err { color: #c8283a; font-weight: 600; font-size: 14px; min-height: 18px; margin: 0; }
.ap-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px; border-radius: 999px; border: 0; background: var(--sc-cobalt); color: #fff; font: 700 15.5px var(--sc-font); cursor: pointer; text-decoration: none; }
.ap-btn:hover { background: var(--sc-cobalt-deep); }
.ap-btn:disabled { opacity: .5; cursor: not-allowed; }
.ap-btn-s { background: #fff; color: var(--sc-cobalt); box-shadow: inset 0 0 0 2px var(--sc-cobalt); }
.ap-btn-s:hover { background: var(--sc-cobalt-soft); }
.ap-btn-y { background: var(--sc-yellow); color: var(--sc-ink); }
.ap-links { margin: 16px 0 0; font-size: 14px; color: var(--sc-slate); }
.ap-links a { color: var(--sc-cobalt); font-weight: 600; }
.ap-sbx { margin-top: 18px; padding: 14px; border: 1.5px dashed var(--sc-silver); border-radius: 14px; font-size: 13.5px; color: var(--sc-slate); }
.ap-sbx-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.ap-sbx-btn { border: 1px solid var(--sc-line); background: var(--sc-cobalt-soft); color: var(--sc-cobalt); border-radius: 999px; padding: 8px 12px; font: 700 13px var(--sc-font); cursor: pointer; min-height: 40px; }
.ap-loading { min-height: 40vh; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--sc-slate); font-weight: 600; }
.ap-spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--sc-cobalt-soft); border-top-color: var(--sc-cobalt); animation: apspin .8s linear infinite; }
@keyframes apspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ap-spin { animation: none; } }

/* athlete switcher (header) */
.ax-switch { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; margin-right: 8px; position: relative; background: var(--sc-cobalt-soft); border: 1px solid var(--sc-line); border-radius: 999px; padding: 4px 30px 4px 12px; min-height: 40px; }
.ax-switch-k { font: 800 10.5px var(--sc-font); letter-spacing: .08em; text-transform: uppercase; color: var(--sc-slate); }
.ax-switch select { appearance: none; -webkit-appearance: none; border: 0; background: transparent; font: 700 14.5px var(--sc-font); color: var(--sc-cobalt); cursor: pointer; max-width: 170px; }
.ax-switch .sc-ico { position: absolute; right: 9px; width: 16px; height: 16px; pointer-events: none; color: var(--sc-cobalt); }
@media (max-width: 560px) { .ax-switch-k { display: none; } .ax-switch select { max-width: 110px; } }
/* s7: on phones the coach/parent header (logo + athlete switcher + bell + avatar) was wider than the screen, so the
   browser zoomed the whole page out and taps missed (coach Calendar measured 499px on a 412px phone). The header may
   wrap there, and the switcher takes its own full-width line. Athlete accounts have no switcher and are unaffected. */
@media (max-width: 560px) { .ax-head { flex-wrap: wrap; row-gap: 8px; } .ax-head .ax-switch { order: 10; flex: 1 1 100%; margin: 0; } .ax-head .ax-switch select { max-width: none; width: 100%; padding-right: 26px; } .ax-logo { min-width: 0; } .ax-logo small { overflow: hidden; text-overflow: ellipsis; } }

/* roster (coach / parent home) */
.ap-roster { padding: 16px; }
.ap-roster-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.ap-roster-head h2 { margin: 0; font-size: 20px; }
.ap-roster-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.ap-ath { display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--sc-line); background: #fff; cursor: pointer; font: inherit; color: var(--sc-ink); min-height: 56px; }
.ap-ath:hover { border-color: var(--sc-cobalt); }
.ap-ath.is-cur { border-color: var(--sc-cobalt); box-shadow: inset 0 0 0 1px var(--sc-cobalt); }
.ap-ath b { display: block; font-size: 15px; }
.ap-ath small { display: block; color: var(--sc-slate); font-size: 12.5px; }
.ap-ath .pv { margin-left: auto; }
.ap-ath-av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(140deg, var(--sc-cobalt-hi), var(--sc-cobalt-deep)); color: #fff; font-weight: 800; font-size: 14px; flex: none; }

/* empty states and actions */
.ax-empty-card { padding: 18px; }
.ax-empty-actions, .ap-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.ax-thumb-ph { width: 64px; height: 64px; border-radius: 12px; background: #0d1430; color: #c7ccd6; display: grid; place-items: center; flex: none; }
.ax-thumb-ph .sc-ico { width: 24px; height: 24px; }
.ap-toggle { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--sc-ink); min-height: 44px; }
.ap-toggle input { width: 22px; height: 22px; accent-color: var(--sc-cobalt); }
.ap-review { padding: 12px 14px; display: grid; gap: 4px; margin-bottom: 10px; }
.ap-review p { margin: 4px 0 0; }

/* share */
.ap-share { padding: 16px; display: grid; grid-template-columns: minmax(0, 300px) 1fr; gap: 20px; align-items: start; }
.ap-share-prev canvas { width: 100%; height: auto; border-radius: 16px; border: 1px solid var(--sc-line); box-shadow: var(--sc-shadow); }
.ap-share-side h3 { margin: 0 0 8px; }
.ap-manifest { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 4px; font-size: 14.5px; }
.ap-manifest li::before { content: '✓'; color: var(--sc-cobalt); font-weight: 800; margin-right: 8px; }
.ap-manifest li.no { color: var(--sc-mute); }
.ap-manifest li.no::before { content: '—'; color: var(--sc-silver); }
@media (max-width: 760px) { .ap-share { grid-template-columns: 1fr; } .ap-grid { grid-template-columns: 1fr; } }

/* guided capture (sc_capture.js) */
.cap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.cap-stage { position: relative; background: #0b1440; border-radius: 18px; overflow: hidden; aspect-ratio: 16 / 10; }
.cap-stage video, .cap-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.cap-stage .cap-frame { position: absolute; inset: 7% 22%; border: 2px dashed rgba(255, 240, 0, .7); border-radius: 14px; pointer-events: none; }
.cap-stage .cap-rec { position: absolute; top: 12px; left: 12px; background: #c8283a; color: #fff; font: 800 12px var(--sc-font); padding: 6px 10px; border-radius: 999px; display: none; }
.cap-stage.is-rec .cap-rec { display: inline-block; }
/* tap-to-start countdown: one big number over the camera, readable from the batter's box */
.cap-stage .cap-count { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none;
  font: 900 clamp(96px, 30vmin, 220px)/1 var(--sc-font); color: #FFF000; text-shadow: 0 4px 24px rgba(8, 14, 40, .85), 0 0 2px #0b1440; }
/* the "camera starts when you're set up" placeholder is hidden once the camera is live; its display:grid drew it over the video */
.cap-stage .cap-off[hidden] { display: none; }
.cap-cd-pick { display: inline-flex; gap: 4px; }
.cap-cd-pick .ap-btn { min-width: 52px; padding-left: 10px; padding-right: 10px; }
.cap-cd-pick .ap-btn[aria-pressed="true"] { background: #1029B8; color: #fff; }
.cap-stage .cap-off { position: absolute; inset: 0; display: grid; place-items: center; color: #c7ccd6; text-align: center; padding: 20px; font-weight: 600; }
.cap-side { display: grid; gap: 12px; }
.cap-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.cap-steps li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 12px; background: #fff; border: 1px solid var(--sc-line); font-size: 14.5px; }
.cap-steps li b { display: block; }
.cap-steps li small { color: var(--sc-slate); }
.cap-tag { font: 800 10.5px var(--sc-font); letter-spacing: .06em; text-transform: uppercase; padding: 4px 8px; border-radius: 999px; flex: none; margin-top: 2px; }
.cap-tag.v { background: var(--sc-cobalt); color: #fff; }
.cap-tag.g { background: #eef0f4; color: var(--sc-slate); }
.cap-tag.ok { background: #e3f7e9; color: #0f7a3a; }
.cap-tag.no { background: #ffe9ea; color: #c8283a; }
.cap-tag.wait { background: #fff9a8; color: #3d3c12; }
.cap-controls { display: flex; gap: 10px; flex-wrap: wrap; }
.cap-progress { height: 8px; border-radius: 6px; background: var(--sc-cobalt-soft); overflow: hidden; }
.cap-progress i { display: block; height: 100%; width: 0; background: var(--sc-cobalt); transition: width .2s; }
.cap-pick { display: flex; gap: 10px; flex-wrap: wrap; }
.cap-pick button[aria-pressed="true"] { background: var(--sc-cobalt); color: #fff; box-shadow: none; }
@media (max-width: 860px) { .cap { grid-template-columns: 1fr; } .cap-stage { aspect-ratio: 3 / 4; max-height: 62vh; } .cap-stage .cap-frame { inset: 5% 14%; } }

/* analysis: the thing Coach Austin is talking about, and phone-width graphs/tables */
.ax-focus { outline: 3px solid #facc15; outline-offset: 3px; border-radius: 8px; transition: outline-color .3s; }
#axMeasure .ax-table { display: block; overflow-x: auto; max-width: 100%; }
#axMeasure .ax-chart svg { max-width: 100%; }
#axMeasure .ax-ask:focus-visible, #axMeasure [data-vmode]:focus-visible { outline: 2px solid #1d4ed8; outline-offset: 2px; }
@media (max-width: 520px) { #axMeasure .ax-chart figcaption { font-size: 12px; } #axMeasure .ax-table td, #axMeasure .ax-table th { padding: 4px 6px; font-size: 13px; } }

/* profile form: position chips (multi-select) */
.ap-pos-label { font-size: 13px; font-weight: 700; color: var(--sc-slate, #4a5578); margin-bottom: 6px; }
.ap-pos { display: flex; flex-wrap: wrap; gap: 8px; }
.ap-chip { position: relative; display: inline-flex; }
.ap-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ap-chip span { min-width: 44px; padding: 8px 12px; border-radius: 999px; border: 1.5px solid #c9d2e6; background: #fff; font-weight: 700; font-size: 14px; text-align: center; color: #0f1a45; }
.ap-chip input:checked + span { background: #1029B8; border-color: #1029B8; color: #fff; }
.ap-chip input:focus-visible + span { outline: 2px solid #4f86ff; outline-offset: 2px; }
.ap-chip input:disabled + span { opacity: .65; }
/* original athlete questionnaire in V2: radio groups, photo, seasons */
.ap-radio { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ap-radio legend { width: 100%; font-size: 13px; font-weight: 700; color: var(--sc-slate, #4a5578); margin-bottom: 6px; padding: 0; }
.ap-photo { display: flex; align-items: center; gap: 14px; }
.ap-photo-img { width: 72px; height: 72px; border-radius: 50%; overflow: hidden; background: #eef2fb; display: grid; place-items: center; color: #5b6582; font-size: 12px; box-shadow: 0 0 0 3px #fff, 0 0 0 5px #FFF000; }
.ap-photo-img img { width: 100%; height: 100%; object-fit: cover; }
.ap-season { display: grid; grid-template-columns: 90px 1fr 110px repeat(5, 64px) auto; gap: 6px; align-items: end; padding: 8px; border: 1px solid #e3e8f5; border-radius: 12px; margin-bottom: 8px; background: #fff; }
.ap-season input, .ap-season select { min-width: 0; }
.ap-stat { display: flex; flex-direction: column; font-size: 11px; font-weight: 700; color: #5b6582; }
.ap-season-x { border: 0; background: none; color: #b42a33; font-weight: 700; cursor: pointer; }
@media (max-width: 760px) { .ap-season { grid-template-columns: 1fr 1fr; } .ap-season [data-k=team] { grid-column: 1 / -1; } }
