/* The match analysis profile on player_detail (templates/main/partials/_player_analysis*.html, Bryan 12-04). Raw
   CSS: non-lite pages only have a precompiled Tailwind subset. The page's white cards, the highlights' teal. */
.pa {
  --pa-ink: #10262e; --pa-teal: #045571; --pa-cyan: #0891b2; --pa-soft: #e3f1f5; --pa-muted: #5b6770;
  --pa-line: #e3e8eb; --pa-bg: #f6f9fa; --pa-amber: #b45309;
  --hl-ink: #10262e; --hl-teal: #045571; --hl-cyan: #0891b2; --hl-lime: #c5f04a;      /* the clips' player */
  padding: 24px; border-radius: 0.5rem; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
  color: var(--pa-ink); min-width: 0;
}
.pa [hidden] { display: none !important; }
.pa .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pa h2, .pa h3, .pa h4 { margin: 0; text-wrap: balance; }
.pa-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; }
.pa-head-text { min-width: 0; }
.pa-title { font-size: 1.25rem; line-height: 1.3; font-weight: 700; color: #1f2937; }
.pa-sub { margin: 2px 0 0; font-size: 0.875rem; color: var(--pa-muted); }
/* the page's scale: section 20/700 (.pa-title, Quick Info), sub-heading 16/700; 24 between blocks. `.pa h3 {margin:0}`
   above outranks a bare class, hence `.pa .pa-block-title` (the titles sat on their content, UI audit 12-04) */
.pa-block { margin-top: 24px; min-width: 0; }
.pa .pa-block-title, .pa .pa-card-title { display: flex; align-items: center; gap: 2px; font-size: 1rem; font-weight: 700;
  line-height: 1.35; color: #1f2937; }
.pa .pa-block-title { margin-bottom: 12px; }
.pa .pa-card-title { margin-bottom: 10px; }
.pa-card { min-width: 0; display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: 12px;
  border: 1px solid var(--pa-line); background: #fff; }
.pa-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.pa-note { font-size: 0.8125rem; color: var(--pa-muted); }

/* tooltips */
.pa-tip { display: inline-grid; place-items: center; width: 28px; height: 28px; margin: -4px 0; padding: 0; border: 0;
  border-radius: 8px; background: transparent; color: #8a969e; cursor: pointer; flex: none; }
.pa-tip svg { width: 16px; height: 16px; }
.pa-tip:hover, .pa-tip[aria-expanded="true"] { color: var(--pa-teal); background: var(--pa-soft); }
.pa-pop { position: absolute; z-index: 60; max-width: min(280px, calc(100vw - 32px)); padding: 9px 12px; border-radius: 10px;
  background: #10262e; color: #fff; font-size: 0.8125rem; line-height: 1.45; box-shadow: 0 8px 24px rgba(16, 38, 46, .25); }
.pa :focus-visible, .pa-pop:focus-visible { outline: 3px solid var(--pa-cyan); outline-offset: 2px; }

/* Performance rating: number + graph, then what lifts it / holds it back (side by side from 900px) */
.pa-rating { gap: 0; margin-top: 24px; }
.pa-rating-cols { display: grid; grid-template-columns: minmax(0, 1fr); }
.pa-rating-row { display: flex; align-items: flex-end; gap: 16px; }
.pa-rating-num { display: flex; flex-direction: column; flex: none; }
.pa-big { font-size: 2.75rem; line-height: 1; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
  color: var(--pa-teal); }
.pa-rating .pa-graph { flex: 1 1 auto; min-width: 0; margin: 0; }
.pa-rating .pa-graph-plot { height: 76px; }
.pa-why-title { margin: 14px 0 6px !important; font-size: 0.8125rem; font-weight: 700; color: var(--pa-muted); }
.pa-why { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pa-why li { position: relative; padding-left: 24px; font-size: 0.9375rem; line-height: 1.4; }
.pa-why li::before { content: ""; position: absolute; left: 2px; top: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--pa-soft) center / 12px no-repeat; }
.pa-why-up li::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23045571' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.pa-why-down li::before { background-color: #fdf1e3; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12h12' fill='none' stroke='%23b45309' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E"); }

/* graphs (player_analysis/charts.py): a scale on the left, lines across, dots with their day and value */
.pa-graph { display: grid; grid-template-columns: 2.9em minmax(0, 1fr); column-gap: 6px; margin: 8px 0 0; padding-top: 6px;
  min-width: 0; font-size: 0.6875rem; color: var(--pa-muted); }
.pa-graph-axis { position: relative; }
.pa-graph-axis span { position: absolute; right: 0; transform: translateY(-50%); line-height: 1; white-space: nowrap;
  font-variant-numeric: tabular-nums; }
.pa-graph-plot { position: relative; height: 64px; }
.pa-gl { position: absolute; left: 0; right: 0; border-top: 1px solid var(--pa-line); }
.pa-gl.is-mid { border-top: 1px dashed #9db0ba; }
.pa-graph svg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; overflow: visible; }
.pa-graph-line { fill: none; stroke: var(--pa-cyan); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.pa-dot { position: absolute; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--pa-cyan);
  box-shadow: 0 0 0 2px #fff; cursor: pointer; }
.pa-dot::after { content: ""; position: absolute; inset: -7px; }
.pa-dot[aria-expanded="true"] { background: var(--pa-teal); transform: scale(1.35); }
.pa-graph figcaption { grid-column: 2; display: flex; justify-content: space-between; margin-top: 6px; }

/* badges (medal.js) */
.pa-badges { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
.pa-badge { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; height: 100%;
  padding: 12px 6px 10px; border-radius: 12px; border: 1.5px solid var(--pa-line); background: #fff; color: inherit;
  font: inherit; cursor: pointer; transition: border-color .15s; }
.pa-badge:hover, .pa-badge[aria-expanded="true"] { border-color: var(--pa-cyan); }
.pa-medal { display: block; width: 52px; height: 52px; }
.pa-medal .medal { overflow: visible; filter: drop-shadow(0 2px 3px rgba(11, 29, 51, .22)); }
.pa-medal .medal.td { filter: drop-shadow(0 0 6px rgba(124, 155, 247, .55)) drop-shadow(0 2px 3px rgba(11, 29, 51, .25)); }
.pa-medal .medal .sh { animation: ma2-sweep 5.6s ease-in-out infinite; }
.pa-medal .medal.td .sh { animation-duration: 3.4s; }
.pa-medal .medal .tw { transform-box: fill-box; transform-origin: center; animation: ma2-twinkle 2.6s ease-in-out infinite; }
@keyframes ma2-sweep { 0% { transform: translateX(0); } 42%, 100% { transform: translateX(230px); } }
@keyframes ma2-twinkle { 0%, 100% { opacity: .2; transform: scale(.55); } 50% { opacity: 1; transform: scale(1); } }
.pa-badge-name { font-size: 0.8125rem; font-weight: 700; line-height: 1.25; text-align: center; }

/* buttons */
.pa-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 16px;
  border-radius: 10px; border: 1.5px solid var(--pa-teal); background: #fff; color: var(--pa-teal); font: inherit;
  font-size: 0.875rem; font-weight: 700; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .15s; }
.pa-btn:hover { background: var(--pa-soft); }
.pa-btn-sm { min-height: 36px; padding: 0 12px; font-size: 0.8125rem; }
.pa-show { margin-top: 12px; }

/* best plays */
.pa-plays { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.pa-play { min-width: 0; display: flex; flex-direction: column; border-radius: 14px; border: 1px solid var(--pa-line);
  overflow: hidden; background: #fff; }
.pa-play .hl-stage { border-radius: 0; }
.pa-play .hl-play { width: 60px; height: 60px; }
.pa-play .hl-play svg { width: 28px; height: 28px; }
.pa-play-body { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px 14px; flex: 1; }
.pa-play-head { font-size: 1rem; font-weight: 800; line-height: 1.3; }
.pa-play-text { margin: 4px 0 8px; font-size: 0.9375rem; line-height: 1.45; color: #34444c; }
.pa-tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 6px; padding: 0; }
.pa-tags li { font-size: 0.75rem; font-weight: 700; line-height: 1; padding: 5px 9px; border-radius: 999px;
  background: var(--pa-soft); color: var(--pa-teal); }
.pa-play-where { margin: 0 0 10px; font-size: 0.8125rem; color: var(--pa-muted); overflow-wrap: anywhere; }
.pa-play-body .pa-btn { margin-top: auto; }

/* shot quality, athleticism, style */
.pa-picks { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin-bottom: 12px; }
.pa-pick { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 12px; background: var(--pa-soft); }
.pa-pick-worst { background: #fdf3e7; }
.pa-pick-kind { font-size: 0.8125rem; font-weight: 700; color: var(--pa-teal); }
.pa-pick-worst .pa-pick-kind { color: var(--pa-amber); }
.pa-pick-main { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 1.125rem; }
.pa-pick-pct { font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.pa-pick-why { font-size: 0.875rem; color: var(--pa-ink); }
.pa-q-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pa-q-label { display: inline-flex; align-items: center; gap: 2px; font-weight: 700; font-size: 0.9375rem; min-width: 0; }
.pa-q-pct { font-size: 1.375rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--pa-ink); }
.pa-bar { display: block; height: 8px; border-radius: 999px; background: var(--pa-line); overflow: hidden; }
.pa-bar > span { display: block; height: 100%; border-radius: 999px; background: var(--pa-cyan); }
.pa-scale { position: relative; display: block; height: 8px; margin-top: 10px; border-radius: 999px;
  background: linear-gradient(90deg, var(--pa-soft), #bfe0ea); }
.pa-scale > span { position: absolute; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%;
  background: var(--pa-teal); box-shadow: 0 0 0 3px #fff, 0 1px 3px rgba(0, 0, 0, .25); }
.pa-scale-ends { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: 0.75rem; color: var(--pa-muted); }

/* analysed matches: table from 640 px, cards below */
.pa-table-wrap { display: none; overflow-x: auto; border: 1px solid var(--pa-line); border-radius: 12px; }
.pa-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.pa-table th { padding: 10px 12px; text-align: left; font-size: 0.75rem; font-weight: 700; color: var(--pa-muted);
  background: var(--pa-bg); border-bottom: 1px solid var(--pa-line); white-space: nowrap; }
.pa-table td { padding: 10px 12px; border-bottom: 1px solid var(--pa-line); vertical-align: middle; }
.pa-table tr:last-child td { border-bottom: 0; }
.pa-table .pa-num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.pa-act { text-align: right; }
.pa-nowrap { white-space: nowrap; }
.pa-tour { display: block; font-weight: 700; overflow-wrap: anywhere; }
.pa-round { display: block; font-size: 0.8125rem; color: var(--pa-muted); }
.pa-res { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 800; }
.pa-res.is-won { background: #dcfce7; color: #166534; }
.pa-res.is-lost { background: #f1f5f9; color: #475569; }
.pa-mcards { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pa-mcard { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--pa-line); }
.pa-mcard-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.pa-mcard-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; }
.pa-mcard-nums { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 0.8125rem; color: var(--pa-muted); }
.pa-mcard-nums b { color: var(--pa-ink); font-variant-numeric: tabular-nums; }

@media (min-width: 640px) {
  .pa-table-wrap { display: block; }
  .pa-mcards { display: none; }
}
@media (min-width: 900px) {
  .pa-rating-cols { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); column-gap: 28px; align-items: center; }
  .pa-rating .pa-graph-plot { height: 124px; }
  .pa-why-box { border-left: 1px solid var(--pa-line); padding-left: 28px; }
  .pa-why-box > .pa-why-title:first-child { margin-top: 0 !important; }
}
@media (max-width: 639px) {
  .pa { padding: 24px; }                      /* Quick Info's p-6: one left edge down the tab */
  .pa-big { font-size: 2.5rem; }
  .pa-plays { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 84%; overflow-x: auto;
    scroll-snap-type: x mandatory; padding-bottom: 4px; }
  .pa-play { scroll-snap-align: start; }
  .pa-grid-q { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pa-grid-q .pa-card { padding: 12px; }
  .pa-grid-q .pa-q-head { align-items: flex-start; gap: 6px; }
  .pa-grid-q .pa-q-pct { font-size: 1.25rem; }
  .pa-grid-q .pa-graph-plot { height: 52px; }
  .pa-rating-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .pa-grid-q .pa-graph { font-size: 0.625rem; column-gap: 4px; }
  .pa-grid-q .pa-yr { display: none; }                      /* "1 Nov": the year wraps in a half-width card */
}
@media (prefers-reduced-motion: reduce) {
  .pa-medal .medal .sh { animation: none; display: none; }
  .pa-medal .medal .tw { animation: none; }
  .pa * { transition: none !important; }
}

/* Coming soon (Bryan 12-04): the parts not public yet, greyed; titles only (_player_analysis_soon.html) */
.pa-soon { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr)); }                     /* 3 x 2, no tile left alone */
.pa-soon-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0; padding: 14px 16px;
  border-radius: 12px; border: 1px solid var(--pa-line); background: #f6f7f8; }
.pa-soon-name { font-size: 0.9375rem; font-weight: 700; line-height: 1.3; color: #7b868d; }
.pa-soon-bars { display: grid; gap: 6px; width: 100%; }
.pa-soon-bars i { display: block; height: 8px; border-radius: 4px; background: #e3e7ea; }
.pa-soon-bars i:last-child { width: 60%; }
.pa-soon-tag { padding: 2px 10px; border-radius: 999px; background: #e9ecee; color: #5b6770; font-size: 0.75rem;
  font-weight: 700; }
.pa-admin { display: inline-block; margin: 12px 0 0; padding: 3px 10px; border-radius: 999px; background: #fef3c7;
  color: #92400e; font-size: 0.75rem; font-weight: 700; }
@media (max-width: 639px) {                         /* phones: even one-line rows, title left, Coming soon right */
  .pa-soon { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .pa-soon-tile { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; }
  .pa-soon-bars { display: none; }
}
