/* original minimal styles */
.schedule { display: flex; flex-direction: column; }
.class { border: 1px solid #ddd; margin-bottom: 10px; padding: 10px; }

/* controls */
.schedule-switch { display: inline-flex; gap: .5rem; margin: .25rem 0 1rem; }
.schedule-switch button { border: 1px solid #d0d0d0; background: #fff; padding: .4rem .75rem; border-radius: .5rem; cursor: pointer; font-size: .95rem; }
.schedule-switch button.is-active { border-color: #8aa8ff; box-shadow: 0 0 0 3px rgba(138,168,255,.25); }

.schedule-controls { display: grid; gap: .5rem; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; margin: 1rem 0; }
.schedule-controls label { font-size: .95rem; display: grid; gap: .25rem; }
.schedule-controls select, .schedule-controls input { padding: .5rem .6rem; border: 1px solid #d0d0d0; border-radius: .5rem; }
.btn-ics { justify-self: start; align-self: end; border: 1px solid #d0d0d0; padding: .5rem .75rem; border-radius: .5rem; text-decoration: none; font-size: .95rem; }

/* legend */
.room-legend { display:flex; gap:.5rem; align-items:center; margin:.5rem 0 1rem; flex-wrap:wrap; }
.room-legend span { display:flex; align-items:center; gap:.35rem; font-size:.9rem; }
.room-legend .swatch { width:.85rem; height:.85rem; border-radius:.2rem; display:inline-block; background:#e3e3e3; }

/* presenter chip */
.chip { display:inline-flex; gap:.4rem; align-items:center; text-decoration:none; }
.chip__img { width:22px; height:22px; border-radius:50%; object-fit:cover; }
.chip__text { font-size:.95rem; }

/* table */
.schedule-table { width: 100%; border-collapse: collapse; background: #fff; overflow: hidden; border-radius: 12px; }
.schedule-table thead th { background: #f6f7f9; position: sticky; top: 0; z-index: 1; text-align: left; padding: .6rem .75rem; font-weight: 600; border-bottom: 1px solid #e7e7e7; }
.schedule-table tbody td { padding: .55rem .75rem; border-bottom: 1px solid #f0f0f0; vertical-align: top; }
/* stripe groups by start time */
.schedule-table tbody tr.stripe-a { background: #eef6ff; } /* light blue */
.schedule-table tbody tr.stripe-b { background: #ffffff; } /* white */
/* make sure the calendar area has some height when shown */
#schedule-calendar #fc-wrapper { min-height: 420px; }

.schedule-table a { text-decoration: none; }

/* subtle left rule to help tracking */
.schedule-table tbody td { border-left: 1px solid #f0f2f7; }
.schedule-table tbody td:first-child { border-left: 0; }

/* day header row */
.day-header th { background: #eef2ff; color: #1b2b6b; font-weight: 700; padding: .55rem .75rem; border-top: 1px solid #e1e7ff; border-bottom: 1px solid #e1e7ff; }

/* time badge */
.time-badge { font:600 .95rem/1.2 system-ui, sans-serif; white-space:nowrap; }

/* room pill */
.tag-room { padding:.15rem .5rem; border-radius:.5rem; font-size:.8rem; display:inline-block; background:#f1f3f7; }

/* color tints by room name slug.
   Adjust to match your actual place titles. */
.room-dungeon .fc-event-main, .tag-room.room-dungeon       { background: rgba(255, 99, 132, .14); border-left: 4px solid #ff6384; }
.room-tent-1 .fc-event-main, .tag-room.room-tent-1        { background: rgba(54, 162, 235, .14); border-left: 4px solid #36a2eb; }
.room-tent-2 .fc-event-main, .tag-room.room-tent-2        { background: rgba(255, 206, 86, .18); border-left: 4px solid #ffce56; }
.room-upstairs .fc-event-main, .tag-room.room-upstairs    { background: rgba(75, 192, 192, .16); border-left: 4px solid #4bc0c0; }
.room-downstairs .fc-event-main, .tag-room.room-downstairs{ background: rgba(153, 102, 255, .16); border-left: 4px solid #9966ff; }
.room-tent-3 .fc-event-main, .tag-room.room-tent-3        { background: rgba(255, 159, 64, .16); border-left: 4px solid #ff9f40; }

/* fallback if a room has no mapping */
.fc [class*="room-"] .fc-event-main { border-left: 4px solid #8aa8ff; background: rgba(138,168,255,.12); }

/* mobile */
@media (max-width: 720px) {
  .schedule-controls { grid-template-columns: 1fr 1fr; }
  .schedule-table thead { display: none; }
  .schedule-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem .75rem; padding: .75rem; }
  .schedule-table td { border: none !important; padding: 0; }
  .td-day { grid-column: 1 / -1; font-weight: 700; }
  .td-title { grid-column: 1 / -1; }
  .td-presenter, .td-room { opacity: .9; }
}

/* print */
@media print {
  .schedule-controls, .schedule-switch, .room-legend { display:none !important; }
  a::after { content:" (" attr(href) ")"; font-size:.8em; }
  .day-header { break-before: page; }
}
