/* ═══════════════════════════════════════════════════════════════════════════
   RALLY ATL — SCHOOL TEAMS STYLESHEET (/public/school-teams.css)
   Modular design system for Coach School Teams & Tennis Programs.
   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%;
}

#divSchoolTeams {
  width: 100%;
}

/* ── 2. Content Block Component ── */
.content-block {
  background: var(--white, #ffffff);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius, 14px);
  padding: 14px 16px;
  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;
}

/* ── 3. Filters Toolbar ── */
.school-teams-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 200px;
  max-width: 320px;
}

.search-icon {
  position: absolute;
  left: 10px;
  font-size: 13px;
  color: var(--muted, #64748b);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 7px 28px 7px 30px;
  font-size: 13px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: var(--navy, #1a2e44);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.search-clear-btn {
  position: absolute;
  right: 8px;
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 12px;
  display: none;
  padding: 2px 4px;
}

.search-clear-btn:hover {
  color: #475569;
}

.filter-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-filter {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: var(--navy, #1a2e44);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.btn-filter:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.btn-filter.active {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1d4ed8;
  box-shadow: 0 0 0 1px #3b82f6;
}

/* ── 4. School Summary Stats in Side Panel ── */
.schools-summary-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.school-summary-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.school-summary-item:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.school-summary-name {
  font-weight: 700;
  color: var(--navy, #1a2e44);
  display: flex;
  align-items: center;
  gap: 6px;
}

.school-summary-count {
  font-size: 11px;
  font-weight: 700;
  color: #0369a1;
  background: #e0f2fe;
  padding: 2px 7px;
  border-radius: 999px;
}

/* ── 5. School Team Cards ── */
#schoolTeamsGrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  width: 100%;
}

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

.school-team-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04);
}

.school-team-card__coach {
  display: flex;
  align-items: center;
  gap: 10px;
}

.school-team-card__coach .avatar {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  overflow: hidden;
}

.school-team-card__coach .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.school-team-card__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.coach-name-link {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy, #1a2e44);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s ease;
}

.coach-name-link:hover {
  color: #2563eb;
  text-decoration: underline;
}

.school-team-card__details {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  width: 100%;
}

.school-team-card__tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.school-team-card__school-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--navy, #1a2e44);
  display: flex;
  align-items: center;
  gap: 6px;
}

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

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

.tag-badge--sky {
  background: #f0f9ff;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.tag-badge--green {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.tag-badge--purple {
  background: #faf5ff;
  color: #7e22ce;
  border: 1px solid #e9d5ff;
}

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

.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;
}

/* ── 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) {
  .school-team-card {
    flex-direction: row;
    align-items: center;
  }

  .school-team-card__coach {
    width: 220px;
    flex-shrink: 0;
  }
}

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

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

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