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

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

.public-schedule__header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.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 var(--border-default, #e5e7eb);
  border-left-width: 4px;
  border-radius: 0.375rem;
  padding: 0.75rem;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: box-shadow 0.15s;
  cursor: pointer;
}

.session-card:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

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

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

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

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

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

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

.session-card__chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1.4;
}

.session-card__chip--full     { background: #fee2e2; color: #991b1b; }
.session-card__chip--waitlist { background: #fef3c7; color: #92400e; }
.session-card__chip--spots    { background: #f3f4f6; color: #374151; }
.session-card__chip--price    { background: #f0fdf4; color: #166534; }
.session-card__chip--level    { background: #f3f4f6; color: #374151; }

.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-venmo {
  background: #008CFF;
  color: #fff;
  border-color: transparent;
}
.btn-venmo:hover { background: #0070cc; }

.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;
  background: white;
}

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


/* ── Public schedule: category filter single-select overrides ─────────── */

/* Override schedule.css: inactive chips are full opacity by default */
.public-schedule .category-filter__btn[data-active="false"] {
  opacity: 1;
}

/* When a category is active, dim other (non-all) chips */
.public-schedule .category-filter[data-filtered] .category-filter__btn[data-active="false"]:not([data-all]) {
  opacity: 0.5;
}

/* "All" chip: use dot color for border but no dot element */
.public-schedule .category-filter__btn[data-all] .category-filter__dot {
  display: none;
}

/* Color dot spec: 7px */
.public-schedule .category-filter__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

/* ── Mobile: smaller category filter buttons ─────────────────────────── */
@media (max-width: 639px) {
  .category-filter__btn {
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem;
    gap: 0.25rem;
  }

  .category-filter__dot {
    width: 0.5rem;
    height: 0.5rem;
  }
}

/* ── View toggle buttons (block / grid) ─────────────────────────────────── */
.schedule-view-toggle-group {
  display: flex;
  align-items: center;
}

.view-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.375rem 0.5rem;
  background: #f9fafb;
  border: 1px solid #d1d5db;
  color: #6b7280;
  cursor: pointer;
  line-height: 1;
  transition: background 0.1s, box-shadow 0.1s;
}

.view-toggle-btn:hover {
  background: #f3f4f6;
  color: #374151;
}

.view-toggle-btn--left {
  border-radius: 0.375rem 0 0 0.375rem;
  border-right: none;
}

.view-toggle-btn--right {
  border-radius: 0 0.375rem 0.375rem 0;
}

.view-toggle-btn--active {
  background: #e5e7eb;
  color: #111827;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* ── View visibility — override display:flex when hidden class is toggled ── */
/* Tailwind .hidden is in @layer utilities, which loses to unlayered CSS.   */
.public-week-grid.hidden { display: none; }
.timetable-grid.hidden   { display: none; }

/* ── Public grid view session blocks ────────────────────────────────────── */
.public-grid-block {
  pointer-events: auto;
  cursor: pointer;
  border-radius: 3px;
  overflow: hidden;
}

.public-grid-block--rental {
  pointer-events: none;
  cursor: default;
}

/* Hide instructor/capacity on short blocks (< 45px height) */
.public-grid-block--compact .session-block__instructor,
.public-grid-block--compact .session-block__capacity { display: none; }

.session-block--pending {
  border: 2px dashed rgba(0,0,0,0.3);
}

/* ── Enrollment modal redesign ──────────────────────────────────────────── */

.modal-content {
  max-width: 440px;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  overflow-y: auto;
  padding: 0; /* override schedule.css 1.5rem padding */
}

/* Header strip */
.modal-header-strip {
  position: relative;
  padding: 1.25rem 3rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.modal-header-strip__level {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.7);
}

.modal-header-strip__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.modal-header-strip__instructor {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.85);
}

.modal-header-strip__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  font-size: 1.125rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.modal-header-strip__close:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Body */
.modal-body {
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Detail grid */
.modal-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.modal-detail-cell {
  background: var(--bg-subtle, #f9fafb);
  border-radius: 8px;
  padding: 10px 12px;
}

.modal-detail-cell__label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fg-muted, #6b7280);
  margin-bottom: 2px;
}

.modal-detail-cell__value {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-primary, #111827);
}

/* Template description */
.modal-description {
  font-size: 0.875rem;
  color: var(--fg-primary, #374151);
  line-height: 1.5;
}

/* Capacity bar */
.modal-capacity {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-capacity__bar-track {
  height: 7px;
  border-radius: 9999px;
  background: var(--border-default, #e5e7eb);
  overflow: hidden;
}

.modal-capacity__bar-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.3s;
}

.modal-capacity__text {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--fg-muted, #6b7280);
}

.modal-capacity__status {
  font-weight: 500;
}

/* Cancellation policy banner */
.modal-policy-banner {
  background: var(--bg-subtle, #f9fafb);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 11px;
  color: var(--fg-muted, #9ca3af);
}

/* Approval notice */
.modal-approval-notice {
  flex: 1;
  background: var(--status-warning-bg, #fffbeb);
  border: 1px solid var(--status-warning-border, #fde68a);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.875rem;
}

/* Offered notice */
.modal-offered-notice {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--status-warning-fg, #92400e);
  margin-bottom: 0.5rem;
  width: 100%;
}

/* Footer */
.modal-footer {
  padding: 0 1.25rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0;          /* override schedule.css */
  border-top: none;       /* override schedule.css */
  justify-content: flex-start; /* override schedule.css flex-end */
}

.modal-btn-close {
  flex: 1;
}

/* Package selector */
.modal-pkg-selector {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-section__label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fg-muted, #6b7280);
  margin-bottom: 4px;
  display: block;
}

.pkg-option {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 2px solid var(--border-default, #e5e7eb);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  transition: border-color 0.1s, background 0.1s;
}

.pkg-option:has(input:checked) {
  border-color: var(--pkg-color, #6b7280);
  background: color-mix(in srgb, var(--pkg-color, #6b7280) 10%, white);
}

.pkg-radio {
  accent-color: var(--pkg-color, #6b7280);
  flex-shrink: 0;
}

.pkg-option__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.pkg-option__name {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-primary, #111827);
}

.pkg-option__credits {
  font-size: 11px;
  color: var(--fg-muted, #6b7280);
}

/* Note textarea */
.modal-note-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.modal-note-textarea {
  width: 100%;
  border: 1px solid var(--border-default, #e5e7eb);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 0.8125rem;
  color: var(--fg-primary, #374151);
  resize: none;
  font-family: inherit;
  background: var(--bg-subtle, #f9fafb);
}

.modal-note-textarea:focus {
  outline: none;
  border-color: var(--border-focus, #6b7280);
}

/* Confirmation state */
.modal-confirm-state {
  margin: 0 1.25rem 1.25rem;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
}

.modal-confirm-state__msg {
  font-size: 1rem;
  font-weight: 600;
}

/* Error state */
.modal-error-state {
  margin: 0 1.25rem 1.25rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
}

.modal-error-state__msg {
  font-size: 0.9375rem;
  font-weight: 600;
}

/* Mobile: full-screen modal */
@media (max-width: 640px) {
  .modal-content {
    position: fixed;
    inset: 0;
    max-width: none;
    width: 100%;
    border-radius: 0;
    max-height: 100vh;
  }
}
