/* Page-specific layout for matchups.html */

.matchups-grid {
  max-width: var(--content-max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 14px;
}

@media (min-width: 700px) {
  .matchups-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .matchups-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.matchup-card {
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.matchup-card:hover {
  border-color: var(--accent-color);
  transform: translateY(-2px);
}

.matchup-no-opponent {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 4px;
}

.efficiency-badge {
  font-size: 0.65rem;
  font-weight: bold;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  margin-left: 6px;
}

.bench-loss-badge {
  font-size: 0.65rem;
  font-weight: bold;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
  margin-left: 4px;
}

/* Win Probability Bar */
.win-prob-bar-wrap {
  position: relative;
  height: 18px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 9px;
  overflow: hidden;
  margin: 6px 0;
  display: flex;
  align-items: center;
}

.win-prob-fill {
  height: 100%;
  transition: width 0.3s ease;
}

.win-prob-fill.team-a-fill {
  background: rgba(16, 185, 129, 0.4);
}

.win-prob-fill.team-b-fill {
  background: rgba(59, 130, 246, 0.4);
}

.win-prob-badge {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  font-weight: bold;
  color: var(--text-main);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}

/* Compact Positional Summary Above Side-by-Side Teams */
.modal-summary {
  width: 100%;
  margin-bottom: 14px;
}

.pos-summary-details {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 8px 12px;
}

.pos-summary-toggle {
  font-size: 0.8rem;
  font-weight: bold;
  color: var(--accent-color);
  cursor: pointer;
  outline: none;
  user-select: none;
}

.pos-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}

@media (max-width: 700px) {
  .pos-summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .pos-summary-grid {
    grid-template-columns: repeat(1, 1fr);
  }
}

.pos-summary-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 6px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  box-sizing: border-box;
}

.pos-item-scores {
  font-weight: bold;
  color: var(--text-main);
}

/* Detail modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
  z-index: 100;
}

.modal-overlay.is-hidden {
  display: none;
}

.modal-panel {
  max-width: var(--content-max-width);
  width: 100%;
  margin-top: 24px;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-main);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  background: var(--accent-color);
  color: #0f172a;
}

.modal-title {
  text-align: center;
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 16px;
  padding-right: 32px;
}

.modal-teams {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 16px;
}

@media (min-width: 800px) {
  .modal-teams {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.modal-team-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 6px;
  margin-bottom: 8px;
}

.modal-team-name {
  font-weight: bold;
}

.modal-team-score {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--accent-color);
}

.starter-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 4px;
  border-radius: 6px;
  background-color: rgba(0, 0, 0, 0.2);
  margin-bottom: 4px;
}

.starter-slot {
  font-size: 0.62rem;
  font-weight: bold;
  color: var(--text-muted);
  min-width: 44px;
  padding-top: 2px;
  flex-shrink: 0;
}

.starter-main {
  flex: 1;
  min-width: 0;
}

.starter-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.starter-name {
  font-size: 0.85rem;
  font-weight: bold;
}

.starter-team {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.starter-stat-line {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.starter-points {
  font-size: 0.9rem;
  font-weight: bold;
  color: var(--accent-color);
  flex-shrink: 0;
  padding-top: 2px;
}

.starter-row.is-bench {
  opacity: 0.6;
}

.bench-details {
  margin-top: 10px;
}

.bench-summary {
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: bold;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 6px 4px;
}

.bench-summary:hover {
  color: var(--text-main);
}

.bench-details[open] .bench-summary {
  margin-bottom: 6px;
}
