/* PLAYER.ID Tournament Assessment Premium V1
   Presentation-only pass on the live Tournament Assessment scoring form
   (#matchAssessmentPage), bringing it onto the locked Coach Premium DNA
   (--pid-theme-* tokens, neumorphic surfaces, light/dark support) that
   already covers Coach Dashboard / My Reports / My Tournaments /
   Development Review (playerid-coach-premium.css).

   SAFETY CONTRACT
   - Additive only. #matchAssessmentPage keeps its original
     "pid-coach-tournament" class (and every rule in
     playerid-coach-workspace.css that targets it); this file only adds
     the new "pid-coach-tournament-premium" class and new "pid-tas-*"
     classes to restyle the same existing markup.
   - No JS behaviour, IDs, onclick handlers, data-id/data-v attributes,
     Supabase calls or scoring math are touched by this file. Rating
     buttons, sub-rows and pillar cards keep their original class names
     (.rating-buttons, .sub-row, .pillar-card, .active, ...) alongside
     the new pid-tas-* modifiers, so existing selectors in index.html's
     inline script keep working unchanged.
   - Loaded after playerid-coach-workspace.css and playerid-coach-premium.css
     so equal-specificity selectors here win the cascade without needing
     to out-specify the legacy V1 rules.
*/

#matchAssessmentPage.pid-coach-tournament-premium {
  font-family: 'Plus Jakarta Sans', sans-serif;
}
#matchAssessmentPage.pid-coach-tournament-premium * { box-sizing: border-box; }

/* ===================================================================
   1. PAGE SURFACE
   =================================================================== */

/* :not(#reportCard) -- the report/PDF V2 preview card also carries the
   plain "card" class but must stay untouched (Report/PDF V2 requirement:
   it remains its own light, separate surface, not part of this premium
   dark-mode-aware pass). A page-wide "force everything light" rule
   elsewhere in index.html (targets .card, .assessment-shell, .summary-box,
   .auto-summary-box, ... with !important) is why every declaration here
   needs matching !important. */
#matchAssessmentPage.pid-coach-tournament-premium > .card:not(#reportCard) {
  border: 0 !important;
  border-radius: 20px !important;
  background: var(--pid-theme-surface-raised) !important;
  color: var(--pid-theme-text-primary) !important;
  box-shadow: var(--pid-theme-shadow-raised) !important;
  backdrop-filter: none !important;
}

/* ===================================================================
   2. HEADER / CONTEXT / STATUS / PROGRESS
   =================================================================== */

#matchAssessmentPage.pid-coach-tournament-premium .pid-tournament-workflow-head {
  background: var(--pid-theme-surface-raised) !important;
  color: var(--pid-theme-text-primary) !important;
}

#matchAssessmentPage.pid-coach-tournament-premium :is(.eyebrow, .pid-tournament-context small) {
  color: var(--pid-theme-teal) !important;
}

#matchAssessmentPage.pid-coach-tournament-premium .module-toolbar h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--pid-theme-text-primary) !important;
}

#matchAssessmentPage.pid-coach-tournament-premium .module-toolbar small {
  color: var(--pid-theme-text-secondary) !important;
}

.pid-tas-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--pid-theme-surface-inset);
  box-shadow: var(--pid-theme-shadow-inset);
  color: var(--pid-theme-text-secondary);
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  vertical-align: middle;
}
.pid-tas-status-badge.is-published {
  background: color-mix(in srgb, var(--pid-theme-teal) 16%, transparent);
  color: var(--pid-theme-teal);
  box-shadow: none;
}

#matchAssessmentPage.pid-coach-tournament-premium .module-back {
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  background: var(--pid-theme-surface-raised) !important;
  color: var(--pid-theme-text-primary) !important;
  box-shadow: var(--pid-theme-shadow-raised);
  transition: box-shadow .16s ease, transform .16s ease;
}
#matchAssessmentPage.pid-coach-tournament-premium .module-back:hover { color: var(--pid-theme-teal) !important; }
#matchAssessmentPage.pid-coach-tournament-premium .module-back:active { box-shadow: var(--pid-theme-shadow-inset); }
#matchAssessmentPage.pid-coach-tournament-premium .module-back:focus-visible { outline: 0; box-shadow: var(--pid-theme-shadow-raised), var(--pid-theme-focus-ring); }

#matchAssessmentPage.pid-coach-tournament-premium .pid-tournament-context {
  border: 0;
  border-radius: 16px;
  background: var(--pid-theme-border-soft);
}
#matchAssessmentPage.pid-coach-tournament-premium .pid-tournament-context > div {
  background: var(--pid-theme-surface-inset);
}
#matchAssessmentPage.pid-coach-tournament-premium .pid-tournament-context strong {
  color: var(--pid-theme-text-primary) !important;
}

.pid-tas-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}
.pid-tas-progress-track {
  position: relative;
  flex: 1 1 auto;
  height: 8px;
  min-width: 90px;
  border-radius: 999px;
  background: var(--pid-theme-surface-inset);
  box-shadow: var(--pid-theme-shadow-inset);
  overflow: hidden;
}
.pid-tas-progress-track > i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--pid-theme-teal);
  transition: width .25s ease;
}
.pid-tas-progress-label {
  flex: 0 0 auto;
  color: var(--pid-theme-text-secondary);
  font-size: .68rem;
  font-weight: 750;
  white-space: nowrap;
}

/* ===================================================================
   3. SECTION HEADS / FORM FIELDS / PHOTO
   =================================================================== */

/* Density pass (01/02/04/05 only -- 03's approved architecture is
   untouched): slightly tighter card padding and section-head spacing so
   the five stacked sections read less like five separate tall panels. */
#matchAssessmentPage.pid-coach-tournament-premium > .card:not(#reportCard):not(.assessment-shell) {
  padding: 20px 22px !important;
}
#matchAssessmentPage.pid-coach-tournament-premium .pid-tournament-section-head {
  margin-bottom: 14px !important;
}
#matchAssessmentPage.pid-coach-tournament-premium .pid-tournament-section-head > span {
  border-radius: 11px;
  background: var(--pid-theme-surface-inset);
  box-shadow: var(--pid-theme-shadow-inset), inset 0 0 0 1px rgba(19,170,166,.16);
  color: var(--pid-theme-teal);
}
#matchAssessmentPage.pid-coach-tournament-premium .pid-tournament-section-head .title {
  color: var(--pid-theme-text-primary) !important;
}
#matchAssessmentPage.pid-coach-tournament-premium .pid-tournament-section-head p {
  color: var(--pid-theme-text-secondary) !important;
}

#matchAssessmentPage.pid-coach-tournament-premium label {
  color: var(--pid-theme-text-secondary) !important;
}

#matchAssessmentPage.pid-coach-tournament-premium :is(input, select, textarea) {
  border: 1px solid var(--pid-theme-border-soft) !important;
  border-radius: 10px !important;
  background: var(--pid-theme-surface) !important;
  color: var(--pid-theme-text-primary) !important;
  box-shadow: none !important;
  transition: border-color .16s ease, box-shadow .16s ease;
}
#matchAssessmentPage.pid-coach-tournament-premium :is(input, select, textarea):hover:not(:disabled) {
  border-color: var(--pid-theme-teal) !important;
}
#matchAssessmentPage.pid-coach-tournament-premium :is(input, select, textarea):focus-visible {
  border-color: var(--pid-theme-teal) !important;
  outline: 0 !important;
  box-shadow: var(--pid-theme-focus-ring) !important;
}
#matchAssessmentPage.pid-coach-tournament-premium :is(input, select, textarea):disabled {
  background: var(--pid-theme-surface-inset) !important;
  color: var(--pid-theme-text-secondary) !important;
  opacity: .75;
}
#matchAssessmentPage.pid-coach-tournament-premium .pid-tournament-roster-field input {
  background: var(--pid-theme-surface-inset) !important;
  color: var(--pid-theme-text-primary) !important;
  font-weight: 750;
}
/* .admin-note is a one-line hint under a field (e.g. "Sorted by jersey
   number.") -- it previously inherited the same filled note-box
   treatment as .setup-note/.video-placeholder, which read as an odd
   heavy gray bar for one short caption. Density pass: plain caption
   text, no box, tighter to the field above it. */
#matchAssessmentPage.pid-coach-tournament-premium .admin-note {
  margin-top: 4px !important;
  color: var(--pid-theme-text-secondary) !important;
}
#matchAssessmentPage.pid-coach-tournament-premium .setup-note,
#matchAssessmentPage.pid-coach-tournament-premium .video-placeholder {
  padding: 12px 14px !important;
  background: var(--pid-theme-surface-inset) !important;
  border-color: transparent !important;
  color: var(--pid-theme-text-secondary) !important;
  text-align: left !important;
}

#matchAssessmentPage.pid-coach-tournament-premium .photo-box {
  border: 0 !important;
  border-radius: 14px;
  background: var(--pid-theme-surface-inset) !important;
}
#matchAssessmentPage.pid-coach-tournament-premium .photo {
  border: 2px solid var(--pid-theme-border-soft) !important;
  background: var(--pid-theme-surface) !important;
}

/* Premium upload presentation around the EXISTING #photoUpload input.
   The native input stays in the DOM and in the tab order (clipped, not
   display:none/visibility:hidden, so keyboard users can still Tab to it
   and press Space/Enter to open the file picker -- standard browser
   behaviour for file inputs); the <label for="photoUpload"> handles
   pointer clicks and doubles as the visible "button". No upload/onchange
   logic here -- id, accept, type and onchange are all untouched. */
#matchAssessmentPage.pid-coach-tournament-premium .pid-tas-upload-body {
  flex: 1;
  display: grid;
  gap: 10px;
  min-width: 0;
}
#matchAssessmentPage.pid-coach-tournament-premium .pid-tas-upload-heading {
  color: var(--pid-theme-text-primary) !important;
  font-size: .8rem;
  font-weight: 750;
}
#matchAssessmentPage.pid-coach-tournament-premium .pid-tas-upload-control {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
#matchAssessmentPage.pid-coach-tournament-premium .pid-tas-upload-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0 !important;
}
#matchAssessmentPage.pid-coach-tournament-premium .pid-tas-upload-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 11px;
  background: var(--pid-theme-surface-raised);
  color: var(--pid-theme-text-primary);
  box-shadow: var(--pid-theme-shadow-raised);
  font-size: .78rem;
  font-weight: 800;
  cursor: pointer;
  transition: box-shadow .16s ease, color .16s ease, transform .1s ease;
}
#matchAssessmentPage.pid-coach-tournament-premium .pid-tas-upload-trigger:hover { color: var(--pid-theme-teal); }
#matchAssessmentPage.pid-coach-tournament-premium .pid-tas-upload-trigger:active { transform: translateY(1px); box-shadow: var(--pid-theme-shadow-inset); }
/* Focus lands on the visually-clipped native input, not this label, so
   the focus ring is drawn on the label via the sibling combinator --
   keyboard users tabbing to the hidden input still get a visible cue. */
#matchAssessmentPage.pid-coach-tournament-premium .pid-tas-upload-input:focus-visible ~ .pid-tas-upload-trigger {
  outline: 0;
  box-shadow: var(--pid-theme-shadow-raised), var(--pid-theme-focus-ring);
}
#matchAssessmentPage.pid-coach-tournament-premium .pid-tas-upload-filename {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--pid-theme-text-secondary);
  font-size: .74rem;
}
@media (max-width: 390px) {
  #matchAssessmentPage.pid-coach-tournament-premium .pid-tas-upload-control { gap: 8px; }
  #matchAssessmentPage.pid-coach-tournament-premium .pid-tas-upload-trigger { width: 100%; }
  #matchAssessmentPage.pid-coach-tournament-premium .pid-tas-upload-filename { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  #matchAssessmentPage.pid-coach-tournament-premium .pid-tas-upload-trigger { transition: none; }
  #matchAssessmentPage.pid-coach-tournament-premium .pid-tas-upload-trigger:active { transform: none; }
}

/* ===================================================================
   4. PERFORMANCE ASSESSMENT SHELL + LIVE SCORE
   =================================================================== */

#matchAssessmentPage.pid-coach-tournament-premium .assessment-shell {
  border: 0 !important;
  border-radius: 20px !important;
  background: var(--pid-theme-surface-raised) !important;
  color: var(--pid-theme-text-primary) !important;
  box-shadow: var(--pid-theme-shadow-raised) !important;
}
#matchAssessmentPage.pid-coach-tournament-premium .assessment-heading {
  border-bottom: 1px solid var(--pid-theme-border-soft) !important;
}

#matchAssessmentPage.pid-coach-tournament-premium .live-total {
  min-width: 118px;
  border: 0 !important;
  border-radius: 16px;
  background: var(--pid-theme-surface-inset) !important;
  box-shadow: var(--pid-theme-shadow-inset), inset 0 -3px 0 var(--pid-theme-teal) !important;
  color: var(--pid-theme-text-primary) !important;
}
#matchAssessmentPage.pid-coach-tournament-premium .live-total .score-label {
  color: var(--pid-theme-text-secondary) !important;
}
#matchAssessmentPage.pid-coach-tournament-premium .live-total b {
  color: var(--pid-theme-text-primary) !important;
}
#matchAssessmentPage.pid-coach-tournament-premium .live-total small {
  color: var(--pid-theme-text-secondary) !important;
}
#matchAssessmentPage.pid-coach-tournament-premium .live-total.score-developing { box-shadow: var(--pid-theme-shadow-inset), inset 0 -3px 0 #c58a2a !important; }
#matchAssessmentPage.pid-coach-tournament-premium .live-total.score-low { box-shadow: var(--pid-theme-shadow-inset), inset 0 -3px 0 #c25a5a !important; }
#matchAssessmentPage.pid-coach-tournament-premium .live-total.score-excellent { box-shadow: var(--pid-theme-shadow-inset), inset 0 -3px 0 var(--pid-theme-teal) !important; }

#matchAssessmentPage.pid-coach-tournament-premium .rating-note {
  border: 0;
  border-radius: 12px;
  background: var(--pid-theme-surface-inset);
  color: var(--pid-theme-text-secondary);
}
#matchAssessmentPage.pid-coach-tournament-premium .rating-note .info-icon {
  background: var(--pid-theme-surface-raised);
  box-shadow: var(--pid-theme-shadow-raised);
  color: var(--pid-theme-teal);
}
#matchAssessmentPage.pid-coach-tournament-premium .rating-note strong {
  color: var(--pid-theme-text-primary);
}

/* ===================================================================
   5. PILLAR NAVIGATION (sticky, so the coach always knows which pillar
      they are rating -- desktop: compact segmented row; mobile: a
      horizontally-scrollable strip, never a wide overflowing tab bar)
   =================================================================== */

.pid-tas-pillar-nav {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  gap: 6px;
  margin: 0 0 16px;
  padding: 6px;
  border-radius: 14px;
  background: var(--pid-theme-surface-inset);
  box-shadow: var(--pid-theme-shadow-inset);
  overflow-x: auto;
  scrollbar-width: none;
}
.pid-tas-pillar-nav::-webkit-scrollbar { display: none; }
.pid-tas-pillar-nav:empty { display: none; }

/* Specificity note: a page-wide "button:not(.pid-gateway-card):not(.pid-
   premium-control), .btn" rule (index.html's access-gateway styles) forces
   a blue gradient onto every plain <button> with !important. These pillar-
   nav buttons live inside #matchAssessmentPage.pid-coach-tournament-premium,
   so every rule below carries that prefix (out-specifying the generic
   selector) plus matching !important, the same pattern already used for
   .pid-tas-rating-btn and the .pid-tas-actions buttons in this file. */
#matchAssessmentPage.pid-coach-tournament-premium .pid-tas-pillar-nav-item {
  display: flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  min-width: 0;
  padding: 0 10px !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: transparent !important;
  color: var(--pid-theme-text-secondary) !important;
  font: inherit;
  font-size: .68rem;
  font-weight: 750 !important;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none !important;
  transition: background-color .16s ease, color .16s ease, box-shadow .16s ease;
}
.pid-tas-pillar-nav-item .pid-tas-pillar-nav-label { overflow: hidden; text-overflow: ellipsis; }
.pid-tas-pillar-nav-item .pid-tas-pillar-nav-count {
  color: var(--pid-theme-text-secondary);
  font-size: .62rem;
  font-weight: 700;
  opacity: .85;
}
.pid-tas-pillar-nav-item .pid-tas-pillar-nav-dot {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pid-theme-border-soft);
}
.pid-tas-pillar-nav-item.is-partial .pid-tas-pillar-nav-dot { background: #c58a2a; }
.pid-tas-pillar-nav-item.is-complete .pid-tas-pillar-nav-dot { background: var(--pid-theme-teal); }
#matchAssessmentPage.pid-coach-tournament-premium .pid-tas-pillar-nav-item.is-active {
  background: var(--pid-theme-surface-raised) !important;
  color: var(--pid-theme-text-primary) !important;
  box-shadow: var(--pid-theme-shadow-raised) !important;
}
.pid-tas-pillar-nav-item.is-active .pid-tas-pillar-nav-count { color: var(--pid-theme-teal); opacity: 1; }
#matchAssessmentPage.pid-coach-tournament-premium .pid-tas-pillar-nav-item:focus-visible {
  outline: 0 !important;
  box-shadow: var(--pid-theme-focus-ring) !important;
}
@media (hover:hover) and (pointer:fine) {
  #matchAssessmentPage.pid-coach-tournament-premium .pid-tas-pillar-nav-item:hover:not(.is-active) {
    background: var(--pid-theme-surface-raised) !important;
    color: var(--pid-theme-text-primary) !important;
  }
}

/* ===================================================================
   6. INDICATOR RATING CARDS (the core scoring unit)
   =================================================================== */

#matchAssessmentPage.pid-coach-tournament-premium .pid-tas-pillar-card {
  border: 0 !important;
  border-radius: 16px !important;
  background: var(--pid-theme-surface-raised) !important;
  box-shadow: var(--pid-theme-shadow-raised) !important;
  scroll-margin-top: 68px;
}
#matchAssessmentPage.pid-coach-tournament-premium .pillar-top {
  background: transparent !important;
  border-bottom: 1px solid var(--pid-theme-border-soft);
}
#matchAssessmentPage.pid-coach-tournament-premium .pillar-number {
  border-radius: 11px;
  background: var(--pid-theme-navy) !important;
  color: var(--pid-theme-teal) !important;
}
#matchAssessmentPage.pid-coach-tournament-premium .pillar-top h3 {
  color: var(--pid-theme-text-primary) !important;
}
#matchAssessmentPage.pid-coach-tournament-premium .pillar-top p {
  color: var(--pid-theme-text-secondary) !important;
}
#matchAssessmentPage.pid-coach-tournament-premium .pillar-score {
  color: var(--pid-theme-teal) !important;
}
#matchAssessmentPage.pid-coach-tournament-premium .pillar-score small {
  color: var(--pid-theme-text-secondary) !important;
}

#matchAssessmentPage.pid-coach-tournament-premium .pid-tas-sub-row {
  border-top: 1px solid var(--pid-theme-border-soft) !important;
  border-radius: 12px;
  padding: 12px 10px !important;
  transition: background-color .16s ease;
}
#matchAssessmentPage.pid-coach-tournament-premium .pid-tas-sub-row.is-rated {
  background: var(--pid-theme-surface-inset);
}
#matchAssessmentPage.pid-coach-tournament-premium .sub-copy strong {
  color: var(--pid-theme-text-primary) !important;
  font-size: .82rem;
}
#matchAssessmentPage.pid-coach-tournament-premium .sub-copy small {
  color: var(--pid-theme-text-secondary) !important;
}

/* Tactile, neumorphic segmented 1-5 control.
   Specificity note: the legacy "#matchAssessmentPage.pid-coach-tournament
   .rating-buttons button[.active][:hover/:focus-visible]" rules (still
   live in playerid-coach-workspace.css, targeting the element these
   buttons keep for JS compatibility) carry a trailing "button" type
   selector that out-specifies a bare ".pid-tas-rating-btn" class rule
   even with !important on both sides. Chaining the ".pid-tas-rating-
   buttons" container class into every selector below adds the specificity
   needed to win instead of relying on load order. */
#matchAssessmentPage.pid-coach-tournament-premium .pid-tas-rating-buttons {
  gap: 8px !important;
}
#matchAssessmentPage.pid-coach-tournament-premium .pid-tas-rating-buttons .pid-tas-rating-btn {
  min-height: 44px !important;
  border: 0 !important;
  border-radius: 11px !important;
  background: var(--pid-theme-surface-raised) !important;
  color: var(--pid-theme-text-primary) !important;
  box-shadow: var(--pid-theme-shadow-raised) !important;
  font-size: .9rem;
  font-weight: 800;
  cursor: pointer;
  transition: background-color .14s ease, color .14s ease, box-shadow .14s ease, transform .1s ease;
}
@media (hover:hover) and (pointer:fine) {
  #matchAssessmentPage.pid-coach-tournament-premium .pid-tas-rating-buttons .pid-tas-rating-btn:not(.active):not(:disabled):hover {
    background: var(--pid-theme-surface-raised) !important;
    border-color: transparent !important;
    color: var(--pid-theme-teal) !important;
  }
}
#matchAssessmentPage.pid-coach-tournament-premium .pid-tas-rating-buttons .pid-tas-rating-btn:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: var(--pid-theme-shadow-inset) !important;
}
#matchAssessmentPage.pid-coach-tournament-premium .pid-tas-rating-buttons .pid-tas-rating-btn:focus-visible {
  outline: 0 !important;
  background: var(--pid-theme-surface-raised) !important;
  box-shadow: var(--pid-theme-shadow-raised), var(--pid-theme-focus-ring) !important;
}
#matchAssessmentPage.pid-coach-tournament-premium .pid-tas-rating-buttons .pid-tas-rating-btn.active {
  background: var(--pid-theme-teal) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: var(--pid-theme-shadow-inset), inset 0 0 0 2px rgba(255,255,255,.28) !important;
}
#matchAssessmentPage.pid-coach-tournament-premium .pid-tas-rating-btn:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
}

/* ===================================================================
   7. COACH NOTES / AUTO INSIGHT
   =================================================================== */

#matchAssessmentPage.pid-coach-tournament-premium .pid-tournament-insight-heading {
  color: var(--pid-theme-text-primary) !important;
}
#matchAssessmentPage.pid-coach-tournament-premium .auto-summary-note {
  color: var(--pid-theme-text-secondary) !important;
}
#matchAssessmentPage.pid-coach-tournament-premium .auto-summary-box {
  border: 0 !important;
  border-radius: 14px !important;
  background: var(--pid-theme-surface-inset) !important;
}
#matchAssessmentPage.pid-coach-tournament-premium .strength-box { box-shadow: inset 0 0 0 1px var(--pid-theme-border-soft), inset 4px 0 0 var(--pid-theme-teal) !important; }
#matchAssessmentPage.pid-coach-tournament-premium .focus-box { box-shadow: inset 0 0 0 1px var(--pid-theme-border-soft), inset 4px 0 0 #c58a2a !important; }
#matchAssessmentPage.pid-coach-tournament-premium .auto-summary-box strong {
  color: var(--pid-theme-text-primary) !important;
}
#matchAssessmentPage.pid-coach-tournament-premium .auto-summary-box span {
  color: var(--pid-theme-text-secondary) !important;
}

#matchAssessmentPage.pid-coach-tournament-premium .pid-tournament-observation {
  border-top: 1px solid var(--pid-theme-border-soft) !important;
}
#matchAssessmentPage.pid-coach-tournament-premium .pid-tournament-observation p {
  color: var(--pid-theme-text-secondary) !important;
}
#matchAssessmentPage.pid-coach-tournament-premium .pid-tournament-observation label small {
  color: var(--pid-theme-text-secondary) !important;
}

/* ===================================================================
   8. REVIEW & ACTIONS (sticky on mobile so actions stay reachable
      without covering form content)
   =================================================================== */

#matchAssessmentPage.pid-coach-tournament-premium #saveStatus .status {
  border: 0;
  border-radius: 12px;
  background: var(--pid-theme-surface-inset);
  color: var(--pid-theme-text-primary);
  box-shadow: var(--pid-theme-shadow-inset);
}
#matchAssessmentPage.pid-coach-tournament-premium #saveStatus .status.ok { box-shadow: var(--pid-theme-shadow-inset), inset 0 0 0 1px color-mix(in srgb, var(--pid-theme-teal) 45%, transparent); }
#matchAssessmentPage.pid-coach-tournament-premium #saveStatus .status.warn { box-shadow: var(--pid-theme-shadow-inset), inset 0 0 0 1px rgba(197,138,42,.4); }
#matchAssessmentPage.pid-coach-tournament-premium #saveStatus .status.error { box-shadow: var(--pid-theme-shadow-inset), inset 0 0 0 1px rgba(194,90,90,.45); }

/* Specificity/!important note: index.html's page-wide access-gateway
   button reset AND a second "force every .btn black or white" rule
   (".btn.dark,.btn.primary,.btn:not(.light):not(.danger)" / ".btn.light")
   both carry !important and both set "border" -- without an explicit
   border override here every one of these buttons kept a stray 1px
   black/grey border (Generate Report) or lost its box-shadow entirely
   (Preview Report, effectively invisible on the page background) because
   only background/color were being reasserted below. Every declaration
   these two legacy rules touch (background, color, border, box-shadow)
   is now reasserted here. */
#matchAssessmentPage.pid-coach-tournament-premium .pid-tas-actions .btn {
  min-height: 46px;
  border: 0 !important;
  border-radius: 12px;
  font-weight: 800;
  box-shadow: var(--pid-theme-shadow-raised) !important;
  transition: box-shadow .16s ease, transform .1s ease;
}
#matchAssessmentPage.pid-coach-tournament-premium .pid-tas-actions .btn:active:not(:disabled) { transform: translateY(1px); box-shadow: var(--pid-theme-shadow-inset) !important; }
#matchAssessmentPage.pid-coach-tournament-premium .pid-tas-actions .btn:focus-visible { outline: 0 !important; box-shadow: var(--pid-theme-shadow-raised), var(--pid-theme-focus-ring) !important; }
/* Action hierarchy: Save Assessment (primary, teal, leads the row) >
   Preview Report / Generate PDF Report (equal-weight neutral secondary)
   > Reset Form (quiet tertiary, set apart with a leading divider so it
   never reads as "just another button" in the row). */
#matchAssessmentPage.pid-coach-tournament-premium .pid-tas-actions .btn.light {
  background: var(--pid-theme-surface-raised) !important;
  color: var(--pid-theme-text-primary) !important;
}
#matchAssessmentPage.pid-coach-tournament-premium .pid-tas-actions .btn.dark {
  background: var(--pid-theme-surface-raised) !important;
  color: var(--pid-theme-text-primary) !important;
  box-shadow: var(--pid-theme-shadow-raised) !important;
}
#matchAssessmentPage.pid-coach-tournament-premium .pid-tas-actions #saveAssessmentBtn {
  border-color: var(--pid-theme-teal) !important;
  background: var(--pid-theme-teal) !important;
  color: #fff !important;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--pid-theme-teal) 35%, transparent) !important;
}
#matchAssessmentPage.pid-coach-tournament-premium .pid-tas-actions #saveAssessmentBtn:hover:not(:disabled) { background: var(--pid-theme-teal-hover) !important; border-color: var(--pid-theme-teal-hover) !important; }
#matchAssessmentPage.pid-coach-tournament-premium .pid-tas-actions #saveAssessmentBtn:disabled {
  background: var(--pid-theme-surface-inset) !important;
  color: var(--pid-theme-text-secondary) !important;
  box-shadow: none !important;
}
#matchAssessmentPage.pid-coach-tournament-premium .pid-tas-actions .btn.danger {
  margin-left: 8px;
  padding-left: 20px !important;
  border-left: 1px solid var(--pid-theme-border-soft) !important;
  border-radius: 0 12px 12px 0 !important;
  background: transparent !important;
  color: #c25a5a !important;
  box-shadow: none !important;
}
@media (max-width: 768px) {
  #matchAssessmentPage.pid-coach-tournament-premium .pid-tas-actions .btn.danger {
    margin-left: 0;
    padding-left: 0 !important;
    border-left: 0 !important;
    border-radius: 12px !important;
    background: var(--pid-theme-surface-raised) !important;
  }
}

/* ===================================================================
   9. SAVED TOURNAMENT RECORDS
   buildRecordCard() renders <h4>/<p> inside .record-card-head (not
   <strong>/<small> -- fixed below, the old selectors never matched
   anything and left the card's own title unstyled -- in dark mode this
   meant an unreadable dark-on-dark heading).
   =================================================================== */

#matchAssessmentPage.pid-coach-tournament-premium .pid-tournament-saved-head .title {
  color: var(--pid-theme-text-primary) !important;
}
#matchAssessmentPage.pid-coach-tournament-premium .pid-tournament-saved-head p {
  color: var(--pid-theme-text-secondary) !important;
}
/* Refresh Records: same page-wide gradient-reset problem as every other
   plain .btn.light here -- ID-scoped reassertion wins on specificity. */
#matchAssessmentPage.pid-coach-tournament-premium .pid-tournament-saved-head .btn.pid-tas-record-refresh {
  border: 0 !important;
  border-radius: 12px !important;
  background: var(--pid-theme-surface-raised) !important;
  color: var(--pid-theme-text-primary) !important;
  box-shadow: var(--pid-theme-shadow-raised) !important;
  font-weight: 800;
  min-height: 44px;
  transition: box-shadow .16s ease, transform .1s ease;
}
#matchAssessmentPage.pid-coach-tournament-premium .pid-tournament-saved-head .btn.pid-tas-record-refresh:hover { color: var(--pid-theme-teal) !important; }
#matchAssessmentPage.pid-coach-tournament-premium .pid-tournament-saved-head .btn.pid-tas-record-refresh:active { transform: translateY(1px); box-shadow: var(--pid-theme-shadow-inset) !important; }
#matchAssessmentPage.pid-coach-tournament-premium .pid-tournament-saved-head .btn.pid-tas-record-refresh:focus-visible { outline: 0 !important; box-shadow: var(--pid-theme-shadow-raised), var(--pid-theme-focus-ring) !important; }

#matchAssessmentPage.pid-coach-tournament-premium #savedList {
  display: grid;
  gap: 10px;
}
#matchAssessmentPage.pid-coach-tournament-premium #savedList .saved {
  border: 0 !important;
  border-radius: 16px !important;
  background: var(--pid-theme-surface-raised) !important;
  box-shadow: var(--pid-theme-shadow-raised) !important;
  padding: 16px 18px !important;
  margin-top: 0 !important;
}
#matchAssessmentPage.pid-coach-tournament-premium #savedList .record-card-head { gap: 14px; }
#matchAssessmentPage.pid-coach-tournament-premium #savedList .saved h4 {
  color: var(--pid-theme-text-primary) !important;
  font-size: .92rem;
  font-weight: 750;
}
#matchAssessmentPage.pid-coach-tournament-premium #savedList .saved p {
  color: var(--pid-theme-text-secondary) !important;
  font-size: .74rem;
  line-height: 1.55;
}
#matchAssessmentPage.pid-coach-tournament-premium #savedList .record-score {
  background: var(--pid-theme-surface-inset) !important;
  box-shadow: var(--pid-theme-shadow-inset) !important;
  color: var(--pid-theme-teal) !important;
}

/* Status badge: same restrained draft/published language as the header
   status badge (.pid-tas-status-badge), swapped onto the existing
   .assessment-status-chip element/classes so JS keeps setting draft/
   published via the same className it always has. */
#matchAssessmentPage.pid-coach-tournament-premium #savedList .assessment-status-chip {
  border: 0 !important;
  background: var(--pid-theme-surface-inset) !important;
  color: var(--pid-theme-text-secondary) !important;
  font-size: .6rem;
}
#matchAssessmentPage.pid-coach-tournament-premium #savedList .assessment-status-chip.published {
  background: color-mix(in srgb, var(--pid-theme-teal) 16%, transparent) !important;
  color: var(--pid-theme-teal) !important;
}
#matchAssessmentPage.pid-coach-tournament-premium #savedList .assessment-status-chip.draft {
  background: var(--pid-theme-surface-inset) !important;
  color: #c58a2a !important;
}

/* Record actions: View / Edit / Publish Assessment / Generate PDF.
   Same hierarchy language as the already-approved My Reports page
   (playerid-coach-premium.css .pid-report-action[-edit|-publish|-pdf]):
   neutral raised base, one teal action (Edit -- the frequent next step),
   Publish recomposed as a deliberate muted/inset action (not black),
   Generate PDF as a quiet ghost action. No bright blue, no solid black. */
#matchAssessmentPage.pid-coach-tournament-premium #savedList .pid-tas-record-actions {
  gap: 8px;
  margin-top: 12px !important;
}
#matchAssessmentPage.pid-coach-tournament-premium #savedList .inline-actions .btn.pid-tas-record-action {
  min-height: 40px;
  padding: 0 14px !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: var(--pid-theme-surface-raised) !important;
  color: var(--pid-theme-text-primary) !important;
  box-shadow: var(--pid-theme-shadow-raised) !important;
  font-size: .74rem;
  font-weight: 750;
  transition: box-shadow .16s ease, transform .1s ease, background-color .16s ease, color .16s ease;
}
#matchAssessmentPage.pid-coach-tournament-premium #savedList .inline-actions .btn.pid-tas-record-action:active { transform: translateY(1px); box-shadow: var(--pid-theme-shadow-inset) !important; }
#matchAssessmentPage.pid-coach-tournament-premium #savedList .inline-actions .btn.pid-tas-record-action:focus-visible { outline: 0 !important; box-shadow: var(--pid-theme-shadow-raised), var(--pid-theme-focus-ring) !important; }
#matchAssessmentPage.pid-coach-tournament-premium #savedList .inline-actions .btn.pid-tas-record-action.pid-tas-record-action--edit {
  background: var(--pid-theme-teal) !important;
  color: #fff !important;
  box-shadow: none !important;
}
#matchAssessmentPage.pid-coach-tournament-premium #savedList .inline-actions .btn.pid-tas-record-action.pid-tas-record-action--edit:hover { background: var(--pid-theme-teal-hover) !important; }
#matchAssessmentPage.pid-coach-tournament-premium #savedList .inline-actions .btn.pid-tas-record-action.pid-tas-record-action--publish {
  background: var(--pid-theme-surface-inset) !important;
  color: var(--pid-theme-text-primary) !important;
  box-shadow: var(--pid-theme-shadow-inset) !important;
  font-weight: 800;
}
#matchAssessmentPage.pid-coach-tournament-premium #savedList .inline-actions .btn.pid-tas-record-action.pid-tas-record-action--pdf {
  background: transparent !important;
  color: var(--pid-theme-text-secondary) !important;
  box-shadow: none !important;
}
#matchAssessmentPage.pid-coach-tournament-premium #savedList .inline-actions .btn.pid-tas-record-action.pid-tas-record-action--pdf:hover { color: var(--pid-theme-teal) !important; }
@media (hover:hover) and (pointer:fine) {
  #matchAssessmentPage.pid-coach-tournament-premium #savedList .inline-actions .btn.pid-tas-record-action:not(.pid-tas-record-action--edit):not(.pid-tas-record-action--pdf):hover {
    color: var(--pid-theme-teal) !important;
  }
}
@media (max-width: 560px) {
  #matchAssessmentPage.pid-coach-tournament-premium #savedList .inline-actions .btn.pid-tas-record-action {
    flex: 1 1 auto;
    min-width: 44px;
    min-height: 42px;
  }
}

/* ===================================================================
   10. RESPONSIVE (1440 desktop / 768 tablet / 390 mobile)
   =================================================================== */

@media (max-width: 900px) {
  .pid-tas-pillar-nav-item .pid-tas-pillar-nav-count { display: none; }
}

@media (max-width: 768px) {
  /* Horizontally-scrollable strip instead of wide tabs: each pillar chip
     keeps its full label (never truncated to 3 letters) and the row
     scrolls if all 5 don't fit, so the coach can always read which
     pillar they're on rather than guessing from an ellipsis. */
  .pid-tas-pillar-nav { top: 0; padding: 5px; gap: 6px; }
  #matchAssessmentPage.pid-coach-tournament-premium .pid-tas-pillar-nav-item { flex: 0 0 auto; min-width: 0; padding: 0 14px !important; font-size: .68rem; }
  .pid-tas-progress { margin-top: 12px; }
  #matchAssessmentPage.pid-coach-tournament-premium .pid-tas-actions {
    position: sticky;
    bottom: 0;
    z-index: 6;
    margin: 16px -18px -18px;
    padding: 12px 18px calc(12px + env(safe-area-inset-bottom, 0px));
    background: var(--pid-theme-surface-raised);
    box-shadow: 0 -8px 20px rgba(0,0,0,.08);
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }
  #matchAssessmentPage.pid-coach-tournament-premium .pid-tas-actions #saveAssessmentBtn { order: -1; grid-column: 1 / -1; }
  #matchAssessmentPage.pid-coach-tournament-premium .pid-tas-actions .btn.danger { grid-column: 1 / -1; }
}

@media (max-width: 390px) {
  .pid-tas-progress-label { font-size: .64rem; }
  #matchAssessmentPage.pid-coach-tournament-premium .pid-tas-rating-btn { min-height: 46px !important; font-size: .85rem; }
}

/* ===================================================================
   11. ACCESSIBILITY / MOTION
   =================================================================== */

@media (prefers-reduced-motion: reduce) {
  .pid-tas-progress-track > i,
  .pid-tas-pillar-nav-item,
  #matchAssessmentPage.pid-coach-tournament-premium .pid-tas-rating-btn,
  #matchAssessmentPage.pid-coach-tournament-premium .pid-tas-actions .btn,
  #matchAssessmentPage.pid-coach-tournament-premium .module-back {
    transition: none;
  }
  #matchAssessmentPage.pid-coach-tournament-premium .pid-tas-rating-btn:active:not(:disabled),
  #matchAssessmentPage.pid-coach-tournament-premium .pid-tas-actions .btn:active:not(:disabled) {
    transform: none;
  }
  .pid-tas-pillar-card { scroll-behavior: auto; }
}
