/* ==========================================================================
   BULLDROP — Shared game-page primitives
   Game header, panels, guest-auth prompt, bet controls, mascot footer.
   Loaded after shared.css, before each game's own stylesheet.
   ========================================================================== */

/* ---------- Game page header ---------- */
.game-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 26px 0 20px;
}

.game-head__title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(21px, 3vw, 30px);
  letter-spacing: -0.02em;
}
.game-head__icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  color: var(--brand);
}
.game-head__icon svg { width: 26px; height: 26px; }

/* "How to play" pill */
.howto {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: var(--bg-surface-2);
  color: var(--text-soft);
  font-size: 13.5px;
  font-weight: 600;
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease);
}
.howto:hover { background: var(--bg-elevated); color: var(--text); }
.howto svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ---------- Generic panel ---------- */
.panel {
  padding: 22px;
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  background: var(--bg-surface);
}
.panel--inset { background: var(--bg-surface-2); }
.panel--flush { padding: 0; overflow: hidden; }

.panel__title {
  margin-bottom: 16px;
  font-size: 17px;
}

/* ---------- Guest auth prompt (no logged-in user anywhere) ---------- */
.auth-required {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  min-height: 220px;
  padding: 30px 22px;
  text-align: center;
}
.auth-required__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.auth-required__text {
  max-width: 34ch;
  color: var(--text-mute);
  font-size: 13px;
  line-height: 1.6;
}

/* In-panel CTA — white surface, black label (see reference design) */
.btn--blue {
  background: #ffffff;
  color: #14161f;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
.btn--blue:hover {
  background: #f2f3f7;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55);
}

/* ---------- Segmented tabs ---------- */
.seg {
  display: flex;
  gap: 6px;
  padding: 6px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--bg-inset);
}
.seg__btn {
  flex: 1;
  padding: 11px 14px;
  border-radius: var(--r-md);
  color: var(--text-mute);
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease);
}
.seg__btn:hover { color: var(--text); }
.seg__btn.is-active {
  background: var(--bg-elevated);
  color: var(--text);
  box-shadow: var(--sh-sm);
}
/* Light-on-dark variant from the Tower reference */
.seg__btn.is-active--light {
  background: #f4f5f8;
  color: #14161f;
}

/* ---------- Field row (price / search) ---------- */
.field-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.mini-field {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 10px 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-strong);
  background: var(--bg-inset);
}
.mini-field svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: var(--text-dim);
}
.mini-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: none;
  font-size: 13.5px;
}
.mini-field input::placeholder { color: var(--text-dim); }
.mini-field input:focus { outline: none; }
.mini-field__coin {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--gold-hover), #d98c12);
}

/* ---------- Bet amount control ---------- */
.bet {
  display: grid;
  gap: 12px;
}
.bet__label {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-soft);
}
.bet__input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 6px 6px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-strong);
  background: var(--bg-inset);
}
.bet__input input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.bet__input input:focus { outline: none; }
.bet__currency {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  background: var(--bg-elevated);
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
}

.bet__quick {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.chip {
  padding: 11px 10px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--bg-surface-2);
  color: var(--text-soft);
  font-size: 13.5px;
  font-weight: 700;
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease),
    border-color var(--t) var(--ease);
}
.chip:hover {
  background: var(--bg-elevated);
  color: var(--text);
  border-color: var(--line-strong);
}
.chip.is-active {
  background: var(--gold-dim);
  border-color: rgba(255, 176, 46, 0.42);
  color: var(--gold);
}

/* ---------- Coin glyph ---------- */
.coin {
  display: inline-grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--gold-hover), #d98c12);
  color: #3a2402;
  font-size: 9px;
  font-weight: 900;
  vertical-align: -2px;
}

/* ---------- Data table (players, leaderboards) ---------- */
.gtable__scroll {
  overflow-x: auto;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--bg-surface-2);
}
.gtable {
  width: 100%;
  min-width: 420px;
  border-collapse: collapse;
}
.gtable th {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--text-mute);
  font-size: 11.5px;
  font-weight: 700;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.gtable td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.gtable tbody tr:last-child td { border-bottom: 0; }
.gtable tbody tr { transition: background-color var(--t) var(--ease); }
.gtable tbody tr:hover { background: var(--glass); }

.gtable__num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.gtable__pos { color: var(--green); font-weight: 700; }
.gtable__neg { color: var(--brand); font-weight: 700; }

/* A <button> that opens the auth modal — restate the anchor defaults */
.gplayer {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  width: 100%;
  padding: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.gplayer img {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 8px;
  object-fit: cover;
}
.gplayer span {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge-wait {
  display: inline-block;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  background: var(--glass-2);
  color: var(--text-mute);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

/* Mascot band now lives in shared.css — it is part of the site footer
   on every page, not just the game pages. */

/* ---------- Shared responsive ---------- */
@media (max-width: 768px) {
  .panel { padding: 16px; }
  .game-head { padding: 20px 0 16px; }
  .bet__quick { grid-template-columns: repeat(3, 1fr); }
}
