/* ==========================================================================
   utr-leaderboard.css — Styles for UTR Growth Leaderboard Admin Page
   Follows BEM / OOCSS and mobile-first responsive guidelines.
   ========================================================================== */

/* ── 1. Type Selector Tabs ── */
.leaderboard-type-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.btn-type-tab {
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 20px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-type-tab:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

.btn-type-tab.active,
.btn-type-tab--active {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

/* ── 2. Action / Save Bar ── */
.action-save-bar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  padding: 16px 20px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  margin-bottom: 20px;
}

.action-btn-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.save-status-indicator {
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
}

/* ── 3. Main Leaderboard Layout (Mobile First) ── */
.leaderboard-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 20px;
  align-items: start;
}

/* ── 4. Top Coaches Table Elements ── */
.table-top8 th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.col-cb {
  width: 44px;
  text-align: center;
}

.col-rank {
  width: 50px;
  text-align: center;
  font-weight: 800;
  color: #64748b;
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #334155;
  font-weight: 800;
  font-size: 12px;
}

.growth-badge-table {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background-color: #dcfce7;
  color: #15803d;
  font-weight: 700;
  font-size: 12.5px;
}

.coach-alt-name {
  color: #64748b;
  font-size: 12px;
  font-style: italic;
}

.custom-cb {
  width: 17px;
  height: 17px;
  cursor: pointer;
  accent-color: #2563eb;
}

/* ── 5. Live Honor Board Preview Card Deck ── */
.preview-card-wrap {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.preview-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
}

.preview-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.preview-badge {
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  background: #dbeafe;
  color: #1d4ed8;
  text-transform: uppercase;
}

/* ── 6. Honor Board Existing Record Badges ── */
.badge-published {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
  background-color: #dcfce7;
  color: #15803d;
  margin-left: 6px;
  vertical-align: middle;
}

.badge-draft {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
  background-color: #fef3c7;
  color: #b45309;
  margin-left: 6px;
  vertical-align: middle;
}

/* ── 7. Responsive Breakpoints (Mobile First) ── */
@media (min-width: 640px) {
  .action-save-bar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

@media (min-width: 1024px) {
  .leaderboard-layout {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

/* ── 8. Age Group Query Results (Side-by-Side) ── */
#ageGroupQuerySection {
  margin-top: 32px;
}

.query-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.query-card__header {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f1f5f9;
}

.query-card__title-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.query-card__title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.query-card__desc {
  margin: 0;
  font-size: 13px;
  color: #64748b;
  line-height: 1.4;
}

.query-card__toolbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.query-card__toolbar-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.query-card__search-input {
  padding: 7px 12px;
  font-size: 13px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  font-family: inherit;
  outline: none;
  min-width: 220px;
  transition: border-color 0.2s;
}

.query-card__search-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

/* Side-by-Side Grid */
.query-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
}

.query-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.query-column__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
}

.query-column__header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
}

.query-column__header--girl {
  background: #fdf2f8;
  color: #9d174d;
  border: 1px solid #fbcfe8;
}

.query-column__header--boy {
  background: #f0f9ff;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

/* Category Headers in Query Table */
.table-query__tr-category {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

.table-query__category-cell {
  padding: 8px 12px !important;
  font-weight: 700;
  color: #334155;
  font-size: 12.5px;
  background: #f8fafc;
}

.table-query__category-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Tags & Badges */
.tag-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 11.5px;
  font-weight: 800;
}

.tag-rank--1 {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.tag-rank--2 {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.tag-rank--3 {
  background: #ffedd5;
  color: #c2410c;
  border: 1px solid #fed7aa;
}

.tag-school-level {
  display: inline-block;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  background: #f1f5f9;
  color: #475569;
  margin-left: 4px;
}

/* Mobile-first Breakpoints */
@media (min-width: 480px) {
  .query-card__toolbar-item {
    flex-wrap: nowrap;
  }
}

@media (min-width: 640px) {
  .query-card__header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .query-card__toolbar {
    flex-direction: row;
    align-items: center;
    gap: 16px;
  }
}

@media (min-width: 1024px) {
  .query-grid {
    grid-template-columns: 1fr 1fr;
  }
}

