/* =========================================================================
   player_card.css — player-card header
   ========================================================================= */

.pc-header-card {
  margin-bottom: 8px;
}
.pc-header-card .card-body {
  position: relative;
}
.pc-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}

/* Hero row: logo | identity (name/roles/pickers) | GAR panel */
.pc-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-right: 34px; /* clear the close button */
}
/* uiOutput wrappers shouldn't stretch as flex items */
.pc-hero > .logo-well,
.pc-hero > .pc-gar {
  flex: 0 0 auto;
}
.logo-well {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: 0 0 auto;
}
.logo-well .team-logo {
  max-width: 52px;
  max-height: 52px;
  display: block;
}

.pc-identity {
  flex: 1 1 auto;
  min-width: 0;
}
.pc-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.pc-name {
  margin: 0;
  font-weight: 700;
}
.pc-pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 9999px;
  background: #eef2f7;
  border: 1px solid #e5e7eb;
  font-size: 12px;
  color: #3a3e5b;
  white-space: nowrap;
}
.pc-pill-contract {
  background: #e6eef5;
  border-color: #d4e2ef;
}
.pc-roles {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.chip-role {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 9999px;
  background: #c5e3de;
  color: #00584a;
  border: 1px solid #a9d6ce;
  font-size: 12px;
  font-weight: 600;
}

/* GAR KPI panel (2x2) */
.pc-gar {
  flex: 0 0 auto;
}
.gar-panel {
  min-width: 300px;
  max-width: 380px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  padding: 8px 14px 9px;
  background: rgba(255, 255, 255, 0.5);
}
.gar-panel-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: #3a3e5b;
  margin-bottom: 6px;
}
.kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px 18px;
}
.kpi-cell {
  min-width: 0;
}
.kpi-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: rgba(0, 0, 0, 0.5);
  margin-bottom: 1px;
}
.kpi-valrow {
  display: flex;
  align-items: baseline;
  gap: 7px;
}
.kpi-value {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.05;
  color: #3a3e5b;
}
.kpi-pct {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 9999px;
  background: #f1f5f9;
  border: 1px solid #e5e7eb;
  color: rgba(0, 0, 0, 0.6);
}
.kpi-pct-na {
  color: rgba(0, 0, 0, 0.35);
}
.kpi-bar {
  position: relative;
  height: 7px;
  border-radius: 9999px;
  overflow: hidden;
  margin-top: 5px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.07) 0, rgba(0, 0, 0, 0.07) 20%,
    transparent 20%, transparent 20.5%,
    rgba(0, 0, 0, 0.07) 20.5%, rgba(0, 0, 0, 0.07) 40%,
    transparent 40%, transparent 40.5%,
    rgba(0, 0, 0, 0.07) 40.5%, rgba(0, 0, 0, 0.07) 60%,
    transparent 60%, transparent 60.5%,
    rgba(0, 0, 0, 0.07) 60.5%, rgba(0, 0, 0, 0.07) 80%,
    transparent 80%, transparent 80.5%,
    rgba(0, 0, 0, 0.07) 80.5%, rgba(0, 0, 0, 0.07) 100%
  );
}
.kpi-bar-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.3s ease;
}

/* Season / League / Team pickers: sit under the roles inside the identity
   column (fills the space next to the tall GAR panel). */
.pc-pickers {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.pc-pickers .form-group {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 0;
}
.pc-pickers .control-label {
  margin: 0;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: rgba(0, 0, 0, 0.5);
}
/* Compact the selectize widgets so the picker strip stays slim.
   The control fills its form-group so the label doesn't eat its width. */
.pc-pickers .form-group {
  flex-wrap: nowrap;
}
.pc-pickers .selectize-control {
  margin-bottom: 0;
  flex: 1 1 auto;
}
.pc-pickers .selectize-input {
  min-height: 30px;
  padding: 3px 34px 3px 10px; /* extra right pad so the caret clears the text */
  font-size: 13px;
  line-height: 20px;
}
.pc-pickers .selectize-input > .item {
  max-width: 100%;
}
.pc-pickers .selectize-input .rs-logo {
  width: 16px;
  height: 16px;
}

/* Empty-state message (e.g. no power-play time) */
.pc-empty {
  padding: 48px 16px;
  text-align: center;
  color: rgba(0, 0, 0, 0.5);
  font-size: 15px;
}

/* Shot-map filter toolbar — a grey panel (matches the skaters filter look) so
   the controls read as a contained bar, not loose elements. Shared by the
   Shooting tab and the Power Play tab's Shots / Units cards. */
.shot-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 22px;
  width: fit-content;
  max-width: 100%;
  background-color: #eef3f6;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  padding: 10px 16px;
  margin-bottom: 10px;
}
.shot-toolbar-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.shot-toolbar-group .control-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(0, 0, 0, 0.5);
  margin-bottom: 2px;
}
.shot-toolbar-group .form-group,
.shot-toolbar-group .shiny-input-container {
  margin-bottom: 0;
}
.shot-toolbar-group .shiny-options-group {
  margin-top: 0;
}
.shot-toolbar-group .radio-inline {
  margin-bottom: 0;
}
/* A checkbox sitting alongside a labelled radio group (PP Units "Highlight"):
   drop its label offset and sit it on the radios' baseline, not the group's. */
.shot-toolbar-group .checkbox {
  margin: 0;
}
.shot-toolbar-group .checkbox label {
  margin-bottom: 0;
  font-weight: 400;
}
.shot-toolbar-check {
  align-self: flex-end;
}
.shot-toolbar-sep {
  align-self: stretch;
  width: 1px;
  background: rgba(0, 0, 0, 0.10);
  margin: 2px 0;
}

/* On-the-fly KPI strip under the shot map */
.pp-shotstats {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 10px;
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}
.pp-kpi {
  text-align: center;
  flex: 1 0 auto;
  min-width: 44px;
}
.pp-kpi-val {
  font-size: 15px;
  font-weight: 600;
  color: #3a3e5b;
  line-height: 1.1;
}
.pp-kpi-lab {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: rgba(0, 0, 0, 0.5);
}

/* PP shot-map legend: fixed-height image below the rink, swapped by mode.
   Fixed height keeps the card layout identical for Points vs Density. */
.pp-legend {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}
.pp-legend-img {
  height: 56px;
  width: auto;
  max-width: 100%;
}

