/* ── Game Calculator ─────────────────────────────────────────────────────── */

.gc-wrap {
  max-width: 680px;
  margin: 32px auto;
  padding: 0 16px 48px;
}
.gc-title {
  font-family: 'Oswald', sans-serif;
  font-size: 1.6rem;
  color: var(--brand-dark);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.gc-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.gc-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
  min-width: 80px;
}

/* ── Selectors ──────────────────────────────────────────────────────────── */
.gc-selectors { flex-wrap: wrap; }
.gc-field { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 160px; }
.gc-field .gc-label { min-width: unset; }
.gc-select {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.9rem;
  background: white;
  color: var(--brand-dark);
  cursor: pointer;
}
.gc-select:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Location segmented button ──────────────────────────────────────────── */
.gc-seg {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 7px;
  overflow: hidden;
}
.gc-seg-btn {
  flex: 1;
  min-width: 7.5rem;
  white-space: nowrap;
  padding: 6px 16px;
  background: white;
  border: none;
  border-right: 1px solid var(--border);
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.gc-seg-btn:last-child { border-right: none; }
.gc-seg-btn:hover:not(.gc-seg-active) { background: #f5f0ea; color: var(--brand-dark); }
.gc-seg-btn.gc-seg-active {
  background: var(--brand-dark);
  color: var(--brand-cream);
  font-weight: 600;
  cursor: default;
}

/* ── PPG ────────────────────────────────────────────────────────────────── */
.gc-ppg-input {
  width: 90px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.9rem;
  text-align: right;
}
.gc-reset-btn {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: white;
  font-size: 0.82rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.gc-reset-btn:not(:disabled):hover { background: var(--brand-amber); color: white; border-color: var(--brand-amber); }
.gc-reset-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* ── Table ──────────────────────────────────────────────────────────────── */
.gc-table-wrap {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 8px;
}
.gc-table { width: 100%; border-collapse: collapse; }
.gc-table thead tr { background: var(--brand-dark); }
.gc-table th {
  padding: 10px 12px;
  font-family: 'Oswald', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--brand-cream);
  text-align: left;
  letter-spacing: 0.5px;
}
.gc-th-line, .gc-th-total { text-align: center; }
.gc-table tbody tr { border-top: 1px solid var(--border); }
.gc-table tbody tr:first-child { border-top: none; }
.gc-table tbody tr:nth-child(odd) { background: #faf9f7; }
.gc-table tbody tr:nth-child(even) { background: white; }
.gc-table td { padding: 10px 12px; }
.gc-td-loc { text-align: center; width: 48px; }
.gc-td-num {
  text-align: center;
  width: 100px;
  font-family: monospace;
  font-size: 1rem;
  font-weight: 600;
  color: var(--brand-dark);
}
.gc-loc-badge {
  display: inline-block;
  width: 24px; height: 24px;
  line-height: 24px;
  text-align: center;
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--brand-dark);
  color: var(--brand-cream);
}

/* ── Team search ────────────────────────────────────────────────────────── */
.gc-td-team { min-width: 240px; }
.gc-team-selector { display: flex; align-items: center; gap: 6px; }
.gc-team-input {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.88rem;
  background: white;
}
.gc-team-input:disabled { opacity: 0.45; cursor: not-allowed; }

/* ── Dropdown — fixed-position, appended to body ────────────────────────── */
.gc-dropdown {
  position: fixed;
  min-width: 260px;
  max-height: 220px;
  overflow-y: auto;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.16);
  z-index: 9000;
}
.gc-dropdown-item {
  padding: 8px 12px;
  font-size: 0.88rem;
  cursor: pointer;
  border-bottom: 1px solid #f0ece6;
}
.gc-dropdown-item:last-child { border-bottom: none; }
.gc-dropdown-item:hover,
.gc-dropdown-item.active { background: var(--brand-amber); color: white; }
.gc-dropdown-empty { padding: 10px 12px; font-size: 0.85rem; color: var(--text-muted); }

/* ── Swap button ────────────────────────────────────────────────────────── */
.gc-swap-btn {
  flex-shrink: 0;
  width: 30px; height: 30px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: white;
  font-size: 1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.gc-swap-btn:hover:not(:disabled) { background: var(--brand-amber); color: white; border-color: var(--brand-amber); }
.gc-swap-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* ── Status ─────────────────────────────────────────────────────────────── */
.gc-status {
  margin-top: 14px;
  font-size: 0.8rem;
  color: var(--text-muted);
  min-height: 1.2em;
}

/* ── View Matchup button ─────────────────────────────────────────────────── */
.gc-matchup-btn {
  display: inline-block;
  background: var(--brand-brown);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  padding: 6px 16px;
  font-size: 0.84rem;
  font-weight: 700;
}
.gc-matchup-btn:hover { background: var(--brand-dark); color: white; }

/* ── Details disclosure ─────────────────────────────────────────────────── */
.gc-details {
  margin-top: 10px;
}
.gc-details-summary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  cursor: pointer;
  user-select: none;
  list-style: none;  /* hide default browser marker */
  padding: 4px 2px;
}
.gc-details-summary::-webkit-details-marker { display: none; }
.gc-details-summary::before {
  content: "▶";
  font-size: 0.6rem;
  transition: transform 0.15s;
  display: inline-block;
}
.gc-details[open] .gc-details-summary::before {
  transform: rotate(90deg);
}
.gc-details-summary:hover { color: var(--brand-dark); }

.gc-details-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  font-size: 0.82rem;
}
.gc-details-table thead tr { background: #f5f0ea; }
.gc-details-table th {
  padding: 7px 12px;
  font-family: 'Oswald', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand-brown);
  text-align: center;
  letter-spacing: 0.3px;
  border-bottom: 1px solid var(--border);
}
.gc-details-table th.gc-dt-label { text-align: left; }
.gc-details-table td {
  padding: 6px 12px;
  border-bottom: 1px solid #f0ece6;
  color: var(--brand-dark);
}
.gc-details-table tbody tr:last-child td { border-bottom: none; }
.gc-details-table tbody tr:nth-child(even) { background: #faf9f7; }
.gc-dt-label {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.78rem;
  white-space: nowrap;
}
.gc-dt-team {
  font-family: 'Oswald', sans-serif;
  font-size: 0.82rem;
  color: var(--brand-dark);
  text-align: center;
}
.gc-dt-val { text-align: center; }
.gc-dt-num { font-family: monospace; font-size: 0.85rem; }
