/* ═══════════════════════════════════════════════════════════════════════════
   RALLY ATL — TOURNAMENTS & RANKINGS STYLESHEET (/public/tournaments.css)
   Modular design system for Coach Tournament Wins & USTA Junior Rankings.
   Mobile-First approach with 640px and 1080px responsive breakpoints.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 1. Page Layout & Content Containers ── */
main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#sidePanel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

#divAchievements {
  width: 100%;
}

/* ── 2. Content Block Component ── */
.content-block {
  background: var(--white, #ffffff);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius, 14px);
  padding: 12px;
  box-shadow: var(--shadow, 0 2px 10px rgba(0, 0, 0, 0.03));
}

.content-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 10px;
}

.content-block-title-group h2 {
  font-size: 18px;
  font-weight: 800;
  color: var(--navy, #1a2e44);
  margin: 0 0 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.content-block-sub {
  font-size: 13px;
  color: var(--muted, #64748b);
  margin: 0;
}

/* Accordion / Details support */
details > summary.content-block-header {
  cursor: pointer;
  list-style: none;
  user-select: none;
  flex-wrap: nowrap;
}

details > summary.content-block-header .content-block-title-group {
  flex: 1;
  min-width: 0;
}

details > summary.content-block-header::-webkit-details-marker,
details > summary.content-block-header::marker {
  display: none;
}

details > summary.content-block-header::after {
  content: '▾';
  font-size: 16px;
  line-height: 1;
  color: var(--muted, #64748b);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

details:not([open]) > summary.content-block-header {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

details:not([open]) > summary.content-block-header::after {
  transform: rotate(-90deg);
}

/* ── 3. Navigation Link ── */
.honor-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #1d4ed8;
  text-decoration: none;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 6px 14px;
  border-radius: 6px;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.honor-back-link:hover {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1e40af;
}

/* ── 4. Tournament Achievements Deck & Cards ── */
#tournamentWinsGrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  width: 100%;
}

.honor-row--card {
  background: var(--white, #ffffff);
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.honor-row--card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 0 8px 4px rgba(189, 237, 251, 0.8);
}

.honor-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.honor-row .avatar {
  width: 45px;
  height: 45px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  color: var(--white, #ffffff);
  background: linear-gradient(135deg, #3b82f6, var(--navy, #1a2e44));
  flex-shrink: 0;
  overflow: hidden;
}

.honor-row .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.honor-row-info {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.honor-row-link {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy, #1a2e44);
  text-decoration: none;
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  transition: color 0.15s ease;
}

.honor-row-link:hover {
  color: #2563eb;
  text-decoration: underline;
}

.honor-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  width: 100%;
}

.honor-card-body a {
  color: #1d4ed8;
  font-weight: 700;
  text-decoration: none;
}

.honor-card-body a:hover {
  color: #2563eb;
  text-decoration: underline;
}

.honor-memo {
  font-size: 12px;
  color: #475569;
  line-height: 1.4;
  background: #f8fafc;
  border-left: 3px solid #cbd5e1;
  padding: 6px 10px;
  border-radius: 0 6px 6px 0;
}

/* ── 5. Badges & Tags ── */
.tag-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
}

.tag-badge--default {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.tag-badge--outline {
  background: var(--white, #ffffff);
  color: var(--muted, #64748b);
  border: 1px solid #cbd5e1;
  font-weight: 600;
  font-size: 11px;
}

.tag-badge--group {
  background: #e2e8f0;
  color: #475569;
  font-size: 11px;
  font-weight: 600;
  margin-left: 3px;
}

/* ── 6. Rankings Content & Resource Links ── */
.rankings-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ranking-divisions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.ranking-divisions__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ranking-divisions__list .btn-filter {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

/* Boy Pills */
.btn-filter--boy {
  background-color: #f0f9ff;
  border-color: #bae6fd;
  color: #0369a1;
}

.btn-filter--boy:hover,
.btn-filter--boy:focus {
  background-color: #e0f2fe;
  border-color: #0284c7;
  color: #0284c7;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.15);
}

/* Girl Pills */
.btn-filter--girl {
  background-color: #fdf2f8;
  border-color: #fbcfe8;
  color: #be185d;
}

.btn-filter--girl:hover,
.btn-filter--girl:focus {
  background-color: #fce7f3;
  border-color: #db2777;
  color: #db2777;
  box-shadow: 0 2px 8px rgba(219, 39, 119, 0.15);
}

/* Related Resources */
.resources-group {
  display: flex;
  gap: 10px;
  flex-direction: column;
}

.resources-group__label {
  font-weight: 700;
  font-size: 13px;
  color: var(--navy, #1a2e44);
  width: 100%;
}

.btn-resource {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 12.5px;
  width: 100%;
  justify-content: center;
  border-radius: 8px;
}

/* ── 7. Loading & Empty States ── */
.honor-loading {
  text-align: center;
  padding: 24px 0;
  width: 100%;
  color: var(--muted, #64748b);
  font-size: 14px;
  font-weight: 600;
}

.honor-empty-state {
  text-align: center;
  padding: 36px 16px;
  background: var(--white, #ffffff);
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius, 12px);
  max-width: 450px;
  width: 100%;
  margin: 16px auto;
  color: var(--muted, #64748b);
}

.honor-empty-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.honor-empty-desc {
  font-size: 14px;
  margin: 0;
}

/* ── 8. Responsive Breakpoints ── */
@media (min-width: 640px) {
  .honor-row--card {
    flex-direction: row;
    align-items: center;
  }

  .honor-card-header {
    width: 220px;
    flex-shrink: 0;
  }
}

@media (min-width: 1080px) {
  main {
    flex-direction: row;
    align-items: flex-start;
  }

  #sidePanel {
    width: 380px;
    flex-shrink: 0;
  }

  #divAchievements {
    flex: 1;
    min-width: 0;
  }
}