/* =============================================================================
   CHIPS CARD STYLES
   Shared chips overview card (dashboard + profile) and its tab pills.
   ============================================================================= */

/* ===== CHIPS OVERVIEW CARD — liquid glass ===== */
.rank-overview-card {
  background: var(--bg-base, #0a1628);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 20px 28px 28px;
  margin-bottom: 40px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 24px;
  position: relative;
  overflow: visible;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 4px 24px rgba(0, 0, 0, 0.3),
    0 1px 3px rgba(0, 0, 0, 0.15);
}

/* Dashboard — hide card chrome, only show tabs */
body.dashboard-active .rank-overview-card {
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  margin-bottom: 12px;
  gap: 0;
  box-shadow: none;
}

body.dashboard-active .rank-overview-main,
body.dashboard-active .rank-overview-stats {
  display: none !important;
}

/* ===== INTEGRATED TABS — pill row on bottom edge of card ===== */
.rank-card-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  gap: 12px;
  z-index: 2;
  width: 100%;
}

.rank-card-tab {
  padding: 8px 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  background: #0a1628;
  color: rgba(255, 255, 255, 0.45);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.rank-card-tab.active {
  background: #1a2a40;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

@media (min-width: 1001px) {
  .rank-card-tab.active {
    background: rgba(0, 211, 189, 0.12);
    color: #00D3BD;
    border-color: rgba(0, 211, 189, 0.35);
  }
}

/* ===== CONTENT TOGGLE (Parlays / Duels) — inline with tabs, hidden on desktop ===== */
.content-toggle-btn {
  display: none; /* shown via mobile media query */
}

.content-toggle-btn.active {
  background: rgba(0, 211, 189, 0.12);
  color: #00D3BD;
  border-color: rgba(0, 211, 189, 0.35);
}

/* ===== HORIZONTAL MAIN ROW (balance + username) ===== */
.rank-overview-main {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-shrink: 0;
}

.rank-overview-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex-shrink: 0;
}

/* ===== CHIPS BALANCE ===== */
.chips-balance-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.chips-balance-value {
  font-size: 40px;
  font-weight: 700;
  color: #00D3BD;
  line-height: 1.1;
}

.chips-balance-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ===== USERNAME ROW ===== */
.rank-username-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.rank-username-display {
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}

.rank-username-display.rank-username-placeholder {
  color: rgba(255, 255, 255, 0.3);
  font-style: italic;
}

.rank-username-edit-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.35);
  font-size: 12px;
  padding: 2px 4px;
  cursor: pointer;
  transition: color 0.15s;
  flex-shrink: 0;
}
.rank-username-edit-btn:hover { color: rgba(255, 255, 255, 0.8); }

.rank-username-input {
  display: none;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 2px 8px;
  outline: none;
  width: 180px;
  font-family: inherit;
}
.rank-username-input:focus {
  border-color: rgba(255, 255, 255, 0.3);
}
.rank-username-input.active {
  display: inline-block;
}

/* ===== OVERVIEW STATS — horizontal, spread across remaining space ===== */
.rank-overview-stats {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-evenly;
  flex: 1;
  min-width: 0;
}

.rank-overview-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.rank-overview-stat-value {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
}

.rank-overview-stat-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.stat-positive { color: #4CAF50; }
.stat-negative { color: #F44336; }

/* ===== MOBILE — single breakpoint ===== */
@media (max-width: 1000px) {
  /* Chips card — mobile tweaks (stays horizontal, larger) */
  body.dashboard-active .rank-overview-card { padding: 0; gap: 0; margin-bottom: 36px; }
  .rank-overview-main {
    gap: 24px;
  }
  .chips-balance-value { font-size: 44px; }
  .chips-balance-label { font-size: 14px; }
  .rank-username-display { max-width: 200px; font-size: 28px; }
  .rank-username-edit-btn { font-size: 20px; margin-left: 5px;}
  .rank-username-input { width: 180px; font-size: 26px; }
  .rank-overview-stat-value { font-size: 30px; }
  .rank-overview-stat-label { font-size: 12px; }
  .rank-card-tab { font-size: 26px; padding: 14px 32px; border-radius: 34px; }
  .rank-card-tabs { bottom: -22px; gap: 16px; }

  /* Content toggle (Parlays / Duels) — shown as tab pills on mobile */
  .content-toggle-btn {
    display: inline-block;
  }
}
