/* Summer League Shot Chart — kernel-smoothed heat map component */

.sl-shotchart {
  font-family: 'Azeret Mono', monospace;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-width: 540px;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.sl-shotchart__header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.sl-shotchart__title {
  font-family: 'Russo One', sans-serif;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-slate-700);
  margin: 0;
}

.sl-shotchart__badge {
  font-size: 0.68rem;
  padding: 0.15em 0.55em;
  border-radius: 3px;
  background: var(--color-slate-100);
  color: var(--color-slate-600);
  border: 1px solid var(--color-slate-200);
  white-space: nowrap;
}

.sl-shotchart__badge--warn { background: #fef3c7; color: #92400e; border-color: #fde68a; }

.sl-shotchart__toggle {
  margin-left: auto;
  font: inherit;
  font-size: 0.7rem;
  padding: 0.3em 0.75em;
  border: 1px solid var(--color-accent-indigo, #6366f1);
  border-radius: 4px;
  background: transparent;
  color: var(--color-accent-indigo, #6366f1);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.sl-shotchart__toggle:hover,
.sl-shotchart--dots .sl-shotchart__toggle { background: var(--color-accent-indigo, #6366f1); color: #fff; }

/* ── Court (canvas heat under crisp SVG lines) ──────────────────────────── */
.sl-shotchart__court-wrap {
  position: relative;
  width: 100%;
  max-width: 480px;
  aspect-ratio: 500 / 375;
  margin: 0 auto;
  background: #f4efe6;            /* warm parchment floor */
  border-radius: 4px;
  overflow: hidden;
}

.sl-shotchart__heat,
.sl-shotchart__court {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.sl-shotchart--dots .sl-shotchart__heat { display: none; }

.sl-shotchart__line {
  stroke: #8a8170;
  stroke-width: 2;
  fill: none;
}

/* ── Raw dots (hidden until toggled) ────────────────────────────────────── */
.sl-shotchart__dots { display: none; }
.sl-shotchart--dots .sl-shotchart__dots { display: block; }
.sl-shotchart__dot--made { fill: #10b981; stroke: #065f46; stroke-width: 1; opacity: 0.9; }
.sl-shotchart__dot--miss { fill: none; stroke: #ef4444; stroke-width: 1.5; opacity: 0.85; }

/* ── Legend ─────────────────────────────────────────────────────────────── */
.sl-shotchart__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.64rem;
  color: var(--color-slate-500);
  align-items: center;
  justify-content: center;
}

.sl-shotchart__legend-item { display: inline-flex; align-items: center; gap: 0.35rem; }

.sl-shotchart__grad, .sl-shotchart__fade {
  display: inline-block;
  width: 54px;
  height: 9px;
  border-radius: 2px;
}

.sl-shotchart__grad--div { background: linear-gradient(to right, #e11d48, #eee8dc, #10b981); }
.sl-shotchart__grad--seq { background: linear-gradient(to right, #2563eb, #38bdf8, #facc15, #ef4444); }
.sl-shotchart__fade { background: linear-gradient(to right, rgba(100,116,139,0.1), rgba(100,116,139,0.95)); }

/* ── Zone table ─────────────────────────────────────────────────────────── */
.sl-shotchart__table { width: 100%; border-collapse: collapse; font-size: 0.72rem; color: var(--color-slate-700); }
.sl-shotchart__table th {
  text-align: left; font-weight: 600; padding: 0.3em 0.5em;
  border-bottom: 2px solid var(--color-slate-200);
  color: var(--color-slate-500); text-transform: uppercase;
  letter-spacing: 0.05em; font-size: 0.65rem; white-space: nowrap;
}
.sl-shotchart__table th:not(:first-child) { text-align: right; }
.sl-shotchart__abbr { text-decoration: underline dotted; text-underline-offset: 2px; cursor: help; }
.sl-shotchart__table td { padding: 0.3em 0.5em; border-bottom: 1px solid var(--color-slate-100); white-space: nowrap; }
.sl-shotchart__table td:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.sl-shotchart__table tr:last-child td { border-bottom: none; }
.sl-shotchart__table tr:hover td { background: var(--color-slate-50); }

.sl-shotchart__swatch { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 0.4em; vertical-align: middle; }
.sl-shotchart__vs { font-size: 0.6rem; padding: 0.1em 0.3em; border-radius: 2px; font-weight: 700; }
.sl-shotchart__vs.is-above { background: #d1fae5; color: #065f46; }
.sl-shotchart__vs.is-below { background: #ffe4e6; color: #9f1239; }
.sl-shotchart__vs.is-neutral { background: var(--color-slate-100); color: var(--color-slate-500); }

/* ── Placeholder ────────────────────────────────────────────────────────── */
.sl-shotchart__placeholder {
  border: 1px dashed var(--color-slate-300);
  border-radius: 6px;
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--color-slate-500);
  font-size: 0.8rem;
  line-height: 1.5;
}
.sl-shotchart__placeholder-icon { font-size: 1.75rem; margin-bottom: 0.5rem; display: block; opacity: 0.5; }

@media (max-width: 480px) {
  .sl-shotchart__table { font-size: 0.65rem; }
  .sl-shotchart__legend { font-size: 0.58rem; gap: 0.6rem; }
}

/* ── Career shot-chart layout (player-detail): court left, data right ────── */
.sl-shotchart-wrap {
  display: grid;
  grid-template-columns: minmax(0, 430px) minmax(0, 1fr);
  column-gap: 1.5rem;
  row-gap: 0.85rem;
  align-items: start;
}
/* Section header (Shot Chart + export) spans the full width */
.sl-shotchart-wrap > .stats-section-label { grid-column: 1 / -1; }
/* Court on the left; zone table fills the space beside it, centered to it */
.sl-shotchart-wrap > #sl-shotchart-root { grid-column: 1; }
.sl-shotchart-wrap > .sl-shotchart-zone-table { grid-column: 2; align-self: center; }
/* Small-sample note + shot-diet strip span the full width beneath both */
.sl-shotchart-wrap > .sl-shotchart-note,
.sl-shotchart-wrap > .sl-shot-diet { grid-column: 1 / -1; }

/* Larger zone-breakdown type (shot-chart tables only, all SL surfaces) */
.sl-shotchart-zone-table .sl-stats-table { font-size: 0.92rem; }
.sl-shotchart-zone-table .sl-stats-table thead th { font-size: 0.66rem; padding: 0.375rem 0.4rem; }
.sl-shotchart-zone-table .sl-stats-table td,
.sl-shotchart-zone-table .sl-stats-table tbody th { padding: 0.45rem 0.4rem; }

@media (max-width: 760px) {
  .sl-shotchart-wrap { grid-template-columns: minmax(0, 1fr); }
  .sl-shotchart-wrap > #sl-shotchart-root,
  .sl-shotchart-wrap > .sl-shotchart-zone-table { grid-column: 1; align-self: start; }
}

/* ── Shot-diet strip (shared: player-detail career + player season page) ── */
.sl-shot-diet { margin-top: 0.5rem; }
.sl-shot-diet__row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 2rem;
}
.sl-shot-diet__item { display: inline-flex; align-items: baseline; gap: 0.5rem; }
.sl-shot-diet__label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-slate-500);
}
.sl-shot-diet__val {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-slate-800);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 760px) {
  .sl-shot-diet__row { justify-content: flex-start; gap: 0.5rem 1.5rem; }
  .sl-shot-diet__val { font-size: 1.1rem; }
}
