/* Training schedule page (training-schedule.php) */

/* Venue colours: solid accent + light tint for session cards */
.schedule .venue-st { --venue: #009375; --venue-tint: #e3f4f0; }
.schedule .venue-sv { --venue: #2563eb; --venue-tint: #e6eefd; }
.schedule .venue-sp { --venue: #d89a17; --venue-tint: #fdf3dc; }
.schedule .venue-zr { --venue: #8b3fd9; --venue-tint: #f1e8fc; }

.schedule-intro {
  max-width: 820px;
}

/* Filters */
.schedule-filters {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 30px;
}

.schedule-filter-group {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.schedule-filter-label {
  flex: 0 0 130px;
  padding-top: 7px;
  color: var(--grey2);
}

.schedule-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.schedule-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--grey5);
  border-radius: 999px;
  background: var(--white1);
  color: var(--grey2);
  font-family: "Axiforma";
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.schedule-chip:hover {
  border-color: var(--green2);
}

.schedule-chip:focus-visible {
  outline: 2px solid var(--green2);
  outline-offset: 2px;
}

.schedule-chip.is-active {
  background: var(--green2);
  border-color: var(--green2);
  color: var(--white1);
  font-weight: 600;
}

.schedule-chip-venue.is-active {
  background: var(--venue);
  border-color: var(--venue);
}

.schedule-swatch {
  display: inline-block;
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--venue);
}

.schedule-chip-venue.is-active .schedule-swatch {
  background: var(--white1);
}

/* Table */
.schedule-table-wrap {
  overflow-x: auto;
  margin-bottom: 30px;
}

.schedule-table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
  table-layout: fixed;
}

.schedule-table th,
.schedule-table td {
  border: 0;
  border-bottom: 1px solid var(--grey5);
  padding: 10px 6px;
  vertical-align: top;
  text-align: left;
}

.schedule-table thead th {
  background: var(--grey6);
  font-family: "Barlow";
  font-size: 18px;
  line-height: 22px;
  font-weight: 600;
  color: var(--grey2);
  padding: 14px 6px;
}

.schedule-table .schedule-team-col {
  width: 130px;
  padding-left: 14px;
}

.schedule-team {
  padding-left: 14px !important;
  font-weight: 400;
}

.schedule-team-name {
  display: block;
  font-family: "Barlow";
  font-size: 20px;
  line-height: 24px;
  font-weight: 700;
  color: var(--grey3);
}

.schedule-team-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--grey1);
}

.schedule-team-balti {
  padding: 0 7px;
  border-radius: 4px;
  background: var(--grey3);
  color: var(--white1);
  font-size: 12px;
  line-height: 18px;
  font-weight: 600;
}

.schedule-row:hover th,
.schedule-row:hover td {
  background: #fafbfc;
}

.schedule-day.is-today,
.schedule-table thead th.is-today {
  background: #f4faf8;
}

.schedule-table thead th.is-today {
  background: var(--green2);
  color: var(--white1);
}

.schedule-day-label {
  display: none;
}

.schedule-sessions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.schedule-session {
  display: flex;
  flex-direction: column;
  padding: 6px 10px;
  border-left: 4px solid var(--venue);
  border-radius: 4px;
  background: var(--venue-tint);
}

.schedule-session-time {
  font-size: 15px;
  line-height: 20px;
  font-weight: 600;
  color: var(--grey3);
  white-space: nowrap;
}

.schedule-session-venue {
  font-size: 12px;
  line-height: 16px;
  color: var(--grey4);
}

.schedule-session.is-morning {
  background-image: repeating-linear-gradient(135deg, transparent 0 8px, rgba(255, 255, 255, 0.55) 8px 16px);
}

/* Filtering state (set by trainingSchedule.js) */
.schedule-row.is-hidden,
.schedule-session.is-hidden {
  display: none;
}

.schedule-empty {
  padding: 30px 0;
  text-align: center;
  color: var(--grey1);
}

/* Legend */
.schedule-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 30px;
  list-style: none;
  margin: 0 !important;
  padding: 0 0 20px !important;
}

.schedule-legend li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.schedule-notes p {
  padding-bottom: 8px !important;
  color: var(--grey4);
}

.schedule-notes {
  padding-bottom: 30px;
}

/* Mobile: each group becomes a card listing only the days it trains */
@media screen and (max-width: 783px) {
  .schedule-filter-group {
    flex-direction: column;
    gap: 8px;
  }

  .schedule-filter-label {
    flex: none;
    padding-top: 0;
  }

  .schedule-chip {
    padding: 6px 12px;
  }

  .schedule-table-wrap {
    overflow: visible;
  }

  .schedule-table {
    min-width: 0;
  }

  .schedule-table thead {
    display: none;
  }

  .schedule-table,
  .schedule-table tbody,
  .schedule-row,
  .schedule-table th,
  .schedule-table td {
    display: block;
    width: 100%;
  }

  .schedule-row {
    margin-bottom: 16px;
    border: 1px solid var(--grey5);
    border-top: 4px solid var(--green2);
    border-radius: 6px;
    overflow: hidden;
  }

  .schedule-row.is-hidden {
    display: none;
  }

  .schedule-team {
    display: flex !important;
    align-items: baseline;
    gap: 10px;
    background: var(--grey6);
    padding: 10px 14px !important;
  }

  .schedule-table td {
    display: flex;
    gap: 12px;
    padding: 10px 14px;
  }

  .schedule-table td:last-child {
    border-bottom: 0;
  }

  .schedule-day.is-empty,
  .schedule-day.is-filtered-empty {
    display: none;
  }

  .schedule-day-label {
    display: block;
    flex: 0 0 120px;
    font-size: 14px;
    line-height: 20px;
  }

  .schedule-sessions {
    flex: 1;
  }

  .schedule-legend {
    grid-template-columns: 1fr;
  }
}
