/* ── Public Schedule ─────────────────────────────────────────────────── */

.public-schedule {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

.public-schedule__header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

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

.public-schedule__title {
  font-size: 1.75rem;
  font-weight: 700;
}

.public-week-grid {
  display: flex;
  gap: 0.5rem;
}

.public-day-column {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* ── Responsive day visibility ───────────────────────────────────────────
   display_index: 0 = today (current week) or week start (other weeks)
   negative = days before today (current week only)
   At full width (≥1024px): show all 7 days normally.
   Below 1024px: hide days before today and limit visible count.
──────────────────────────────────────────────────────────────────────── */

/* < 1024px — 5 days: hide past days + indices 5 & 6 */
@media (max-width: 1023px) {
  .public-day-column[data-display-index="-1"],
  .public-day-column[data-display-index="-2"],
  .public-day-column[data-display-index="-3"],
  .public-day-column[data-display-index="-4"],
  .public-day-column[data-display-index="-5"],
  .public-day-column[data-display-index="-6"],
  .public-day-column[data-display-index="5"],
  .public-day-column[data-display-index="6"] {
    display: none;
  }
}

/* < 640px — 3 days: also hide indices 3 & 4 */
@media (max-width: 639px) {
  .public-day-column[data-display-index="3"],
  .public-day-column[data-display-index="4"] {
    display: none;
  }
}

/* < 400px — 2 days: also hide index 2 */
@media (max-width: 399px) {
  .public-day-column[data-display-index="2"] {
    display: none;
  }
}

.public-day-header {
  text-align: center;
  padding: 0.5rem 0;
  border-bottom: 2px solid #e5e7eb;
}

.public-day-header .day-name {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  color: #6b7280;
}

.public-day-header .day-date {
  font-size: 1.25rem;
  font-weight: 700;
}

.public-day-header .today-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: var(--schedule-highlight, #4f46e5);
  color: #fff;
  border-radius: 50%;
}

.public-day-sessions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.no-sessions {
  font-size: 0.75rem;
  color: #9ca3af;
  text-align: center;
  padding: 1rem 0;
}

/* ── Session Card ────────────────────────────────────────────────────── */

.session-card {
  border: 1px solid #e5e7eb;
  border-left-width: 4px;
  border-radius: 0.375rem;
  padding: 0.75rem;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.session-card__time {
  font-size: 0.7rem;
  color: #6b7280;
  font-weight: 500;
}

.session-card__name {
  font-weight: 600;
  font-size: 0.875rem;
}

.session-card__link {
  color: inherit;
  text-decoration: none;
}

.session-card__link:hover {
  color: #4f46e5;
}

.session-card__instructor,
.session-card__resource {
  font-size: 0.75rem;
  color: #6b7280;
}

.session-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.25rem;
}

.capacity-badge {
  font-size: 0.65rem;
  padding: 0.125rem 0.375rem;
  border-radius: 9999px;
  background: #f3f4f6;
  color: #374151;
}

.capacity-badge--full {
  background: #fee2e2;
  color: #991b1b;
}

.badge {
  font-size: 0.65rem;
  padding: 0.125rem 0.375rem;
  border-radius: 9999px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.badge--full    { background: #fee2e2; color: #991b1b; }
.badge--waitlist { background: #fef3c7; color: #92400e; }

.price-badge {
  font-size: 0.65rem;
  padding: 0.125rem 0.375rem;
  background: #ecfdf5;
  color: #065f46;
  border-radius: 9999px;
}

.session-card__actions { margin-top: 0.5rem; }

.btn-disabled {
  background: #e5e7eb;
  color: #9ca3af;
  cursor: default;
  border-color: transparent;
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
}

/* ── Session Detail ──────────────────────────────────────────────────── */

.session-detail {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  color: #4f46e5;
  text-decoration: none;
  margin-bottom: 1.5rem;
}

.back-link:hover { text-decoration: underline; }

.session-detail__cover { margin-bottom: 1.5rem; border-radius: 0.5rem; overflow: hidden; }
.session-detail__cover-image { width: 100%; height: 300px; object-fit: cover; }

.session-detail__header {
  border-left: 4px solid #4f46e5;
  padding-left: 1rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.session-detail__title {
  font-size: 1.75rem;
  font-weight: 700;
}

.level-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: #eff6ff;
  color: #1d4ed8;
}

.session-detail__info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 1rem;
}

.info-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0.5rem;
}

.info-label { font-weight: 600; font-size: 0.875rem; color: #374151; }
.info-value  { font-size: 0.875rem; color: #6b7280; }

.session-detail__description { margin-bottom: 1.5rem; }
.session-detail__description h2 { font-size: 1.125rem; font-weight: 600; margin-bottom: 0.5rem; }

.session-detail__cta { display: flex; justify-content: flex-start; }

.btn-lg { padding: 0.625rem 1.25rem; font-size: 1rem; }

/* ── Mobile nav buttons — collapse to arrows only below 640px ─────── */
@media (max-width: 639px) {
  .week-nav .nav-text { display: none; }
}
