
/* === Schedule spacing & rhythm (theme-preserving) ===
   These rules only affect layout/spacing. Colors, borders, fonts stay as-is.
*/

/* Grid: 1→2→3→4 columns, consistent gaps, equal row height */
#schedule-view {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem; /* 12px default gap */
  grid-auto-rows: var(--slot-h, 56px); /* equal-height time slots */
}

/* Breakpoints */
@media (min-width: 640px) { /* sm */
  #schedule-view { grid-template-columns: repeat(2, 1fr); gap: 0.875rem; }
}
@media (min-width: 768px) { /* md */
  #schedule-view { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
}
@media (min-width: 1024px) { /* lg */
  #schedule-view { grid-template-columns: repeat(4, 1fr); gap: 1rem; }
}
@media (min-width: 1536px) { /* 2xl */
  #schedule-view { gap: 1.125rem; }
}

/* Cards: keep theme, just normalize padding and content spacing */
#schedule-view .schedule-slot {
  padding: 0.875rem 1rem; /* slightly tighter than default for consistent rows */
  min-height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;   /* vertically center for single-slot cards */
}

/* Make booked (spanning) items stack content nicely and stretch */
#schedule-view .booking-block {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between; /* header/top + actions/bottom breathe */
  grid-row: span var(--span, 1) / span var(--span, 1);
}

/* Headings & subtext rhythm inside cards */
#schedule-view .schedule-slot h4 {
  margin: 0;
  line-height: 1.2;
}
#schedule-view .schedule-slot p {
  margin: 0.125rem 0 0 0;
  line-height: 1.2;
}

/* When a row spans multiple slots, add a little internal padding so the block doesn't look too dense */
#schedule-view .booking-block .btn-cancel-booking { 
  margin-top: 0.5rem;
}

/* Top section spacing inside the schedule panel */
#schedule-panel .panel-header,
#schedule-container .panel-header {
  margin-bottom: 0.75rem;
}

/* Optional: gentle divider spacing within the panel if you have one */
#schedule-panel .panel-divider,
#schedule-container .panel-divider {
  margin: 0.75rem 0 1rem 0;
}
