/* ============================================================
   schedule.css - Schedule section: columns, slots, calendar,
                  tooltips, day-detail modal & reschedule UI
   ============================================================ */

/* ===== SCHEDULE SECTION ===== */
.schedule-section {
  max-width: 1600px;
  margin: 0 auto;
  padding: 8px 20px 0;
}

/* The analytics-header is empty on the schedule page - collapse it */
#scheduleSection .analytics-header { padding: 0; min-height: 0; }

.schedule-header-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: 12px;
  flex-wrap: nowrap;
  flex: 1;
  justify-content: flex-end;
}

.schedule-period-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-2);
  white-space: nowrap;
  min-width: 120px;
  text-align: center;
}

.filter-select-sm { padding: 6px 10px; font-size: 13px; }

.schedule-visual-grid { padding: 8px 0 24px; }

/* Filter bar group */
#filterGroupSchedule { gap: 8px; }

.sched-nav-btn {
  font-size: 18px;
  line-height: 1;
  padding: 6px 10px;
  min-width: 30px;
  border-radius: 6px;
}

/* ===== WEEK / BIWEEK COLUMN VIEW ===== */
.sched-cols {
  display: grid;
  grid-template-columns: repeat(var(--sched-cols, 7), 1fr);
  gap: 4px;
  overflow-x: auto;
}

.sched-col {
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--border);
  min-width: 0;
}

.sched-today-col {
  border-color: var(--accent);
  background: rgba(126, 232, 162, 0.04);
}

.sched-col-header {
  padding: 8px 8px 6px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background: var(--bg-3);
  position: relative;
}

.sched-col-add-btn {
  position: absolute;
  top: 50%;
  right: 5px;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s, background 0.15s, color 0.15s;
  padding: 0;
}
.sched-col:hover .sched-col-add-btn,
.sched-today-col .sched-col-add-btn { opacity: 1; }
.sched-col-add-btn:hover {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: var(--accent);
  opacity: 1;
}

.sched-col-day {
  font-size: 10px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-2);
}

.sched-col-date {
  font-size: 18px;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.sched-today-dot { color: var(--accent); }

.sched-col-body {
  padding: 6px 5px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

/* ===== SLOT STATE COLOR SCHEME ===== */
.sched-slot {
  border-left: 3px solid var(--slot-color);
  border-radius: 4px;
  padding: 5px 7px;
  cursor: pointer;
  position: relative;
  transition: filter 0.15s ease, box-shadow 0.15s ease;
  background: color-mix(in srgb, var(--slot-color) 12%, var(--bg-3));
}
.sched-slot:hover {
  filter: brightness(1.18);
  box-shadow: 0 2px 10px rgba(0,0,0,0.35);
}

.sched-slot.sched-slot--unlogged {
  background: rgba(60, 100, 160, 0.18);
  border-left-color: rgba(91, 150, 235, 0.55);
  opacity: 0.6;
}
.sched-slot.sched-slot--unlogged .sched-slot-time { color: rgba(91, 150, 235, 0.7); }

.sched-slot.sched-slot--completed {
  background: rgba(50, 160, 100, 0.16);
  border-left-color: #4ade80;
}
.sched-slot.sched-slot--completed .sched-slot-time { color: #4ade80; }

.sched-slot.sched-slot--cancelled {
  background: rgba(200, 100, 30, 0.16);
  border-left-color: #fb923c;
}
.sched-slot.sched-slot--cancelled .sched-slot-time { color: #fb923c; }

.sched-slot.sched-slot--noshow {
  background: rgba(200, 50, 50, 0.16);
  border-left-color: #f87171;
}
.sched-slot.sched-slot--noshow .sched-slot-time { color: #f87171; }

/* Paid / unpaid badge */
.sched-slot-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
}
.sched-slot-top-row .sched-slot-time {
  flex: 1 1 auto;
  min-width: 0;
}

.sched-slot-paid-badge {
  font-size: 9px;
  font-family: var(--font-mono);
  font-weight: 700;
  line-height: 1;
  padding: 1px 4px;
  border-radius: 3px;
  flex-shrink: 0;
  margin-left: 2px;
}
.sched-slot-paid-badge.is-paid {
  background: rgba(74, 222, 128, 0.2);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.35);
}
.sched-slot-paid-badge.is-unpaid {
  background: rgba(255, 180, 60, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(255, 180, 60, 0.3);
}

/* Half-hour compact slot */
.sched-slot.half-hour { padding: 3px 7px; }
.sched-slot.half-hour .sched-slot-name { font-size: 10px; }
.sched-slot.half-hour .sched-slot-time,
.sched-slot.half-hour .sched-slot-meta { font-size: 9px; }

.sched-slot-note-dot {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  flex-shrink: 0;
  align-self: center;
}

.sched-slot-time {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--slot-color);
  opacity: 0.9;
}
.sched-slot-time-changed { font-size: 9px; opacity: 0.6; margin-left: 2px; font-style: normal; }

.sched-slot-scheduled-badge {
  display: inline-block;
  font-size: 8px;
  font-family: var(--font-mono);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(91, 150, 235, 0.75);
  margin-left: 5px;
  vertical-align: middle;
  opacity: 0.85;
}

.sched-slot-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sched-slot-meta {
  font-size: 10px;
  color: var(--text-2);
  font-family: var(--font-mono);
}

.sched-col-total {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-2);
  text-align: center;
  padding: 4px 0 2px;
  border-top: 1px solid var(--border);
  margin-top: auto;
  cursor: default;
}
.sched-col-total[data-logged] { cursor: help; }

.sched-empty-day {
  font-size: 18px;
  color: var(--border);
  text-align: center;
  padding: 16px 0;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== WORKLOAD BAR CHART ===== */
.sched-bar-row {
  display: grid;
  grid-template-columns: repeat(var(--sched-cols, 7), 1fr);
  gap: 4px;
  margin-top: 8px;
  height: 52px;
  align-items: end;
}

.sched-bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  height: 100%;
  cursor: help;
}

.sched-bar-track {
  flex: 1;
  width: 100%;
  background: var(--bg-3);
  border-radius: 3px 3px 0 0;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.sched-bar-fill {
  width: 100%;
  background: rgba(91, 196, 255, 0.55);
  border-radius: 3px 3px 0 0;
  transition: height 0.3s ease;
  min-height: 2px;
}
.sched-bar-today { background: rgba(126, 232, 162, 0.65); }

.sched-bar-label {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-2);
}

/* ===== MONTH CALENDAR VIEW ===== */
.sched-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.sched-cal-header {
  font-size: 10px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-2);
  text-align: center;
  padding: 6px 0;
}

.sched-cal-cell {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 5px 5px;
  min-height: 68px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.sched-cal-empty  { background: transparent; border-color: transparent; }
.sched-today      { border-color: var(--accent) !important; background: rgba(126, 232, 162, 0.05) !important; }

.sched-cal-date {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.sched-cal-dots  { display: flex; flex-wrap: wrap; gap: 3px; }

.sched-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sched-cal-count {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-2);
  margin-top: auto;
}

/* Month calendar interactivity */
.sched-cal-has-sessions {
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), opacity var(--transition);
}
.sched-cal-has-sessions:hover { border-color: var(--border-light); background: var(--bg-3); }
.sched-cal-dim { opacity: 0.25; transition: opacity 0.18s ease; }

/* ===== SCHEDULE LEGEND ===== */
.sched-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.sched-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-2);
  cursor: pointer;
  border-radius: 4px;
  padding: 2px 5px;
  transition: opacity 0.18s ease, background var(--transition);
  user-select: none;
}
.sched-legend-item:hover   { background: var(--bg-3); }
.sched-legend-dim          { opacity: 0.3; }
.sched-legend-pinned       { background: var(--bg-3); outline: 1px solid var(--border-light); }

.sched-empty {
  color: var(--text-2);
  font-size: 13px;
  padding: 20px 0;
  text-align: center;
}

/* ===== MONTH VIEW STATUS KEY ===== */
.sched-status-key {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  padding-bottom: 8px;
}
.sched-status-key-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ===== SLOT TOOLTIP ===== */
.sched-tooltip {
  position: fixed;
  z-index: 500;
  background: #1a1a22;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 10px 13px;
  min-width: 180px;
  max-width: 240px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.sched-tooltip.visible { opacity: 1; }

.sched-tooltip-name {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.sched-tooltip-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-2);
  padding: 2px 0;
}
.sched-tooltip-row span:last-child { color: var(--text); font-weight: 500; }
.sched-tooltip-note {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--amber);
  font-family: var(--font-body);
  font-style: italic;
  white-space: pre-wrap;
  word-break: break-word;
}
.sched-tooltip-hint { margin-top: 6px; font-size: 10px; color: #50506a; font-family: var(--font-mono); }

/* ===== SESSION NOTE MODAL ===== */
.modal-note-key {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-2);
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 6px 10px;
  margin-bottom: 12px;
  letter-spacing: 0.04em;
}

/* ===== DAY DETAIL MODAL SLOTS ===== */
.day-slots-list { display: flex; flex-direction: column; gap: 10px; }

.day-slot-item {
  background: color-mix(in srgb, var(--slot-color) 8%, var(--bg-3));
  border: 1px solid var(--border);
  border-left: 3px solid var(--slot-color);
  border-radius: 8px;
  padding: 12px;
}

.day-slot-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.day-slot-info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.day-slot-time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--slot-color);
  background: color-mix(in srgb, var(--slot-color) 12%, transparent);
  padding: 2px 6px;
  border-radius: 4px;
}

.day-slot-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.day-slot-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-2);
  white-space: nowrap;
}

.day-slot-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}

.day-slot-note {
  font-size: 12px;
  color: var(--amber);
  font-style: italic;
  background: var(--amber-dim);
  border-radius: 5px;
  padding: 6px 8px;
  margin-bottom: 8px;
  white-space: pre-wrap;
}

.day-slot-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.day-status-section { margin-bottom: 10px; }

/* ===== RESCHEDULE & STATUS CHANGE UI ===== */
.sched-time-reschedule-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
  color: inherit;
  font: inherit;
  font-family: var(--font-mono);
  transition: color 0.15s, text-decoration-color 0.15s;
}
.sched-time-reschedule-btn:hover { color: var(--accent); text-decoration-style: solid; }

.sched-status-change-section {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
}

.sched-status-btn-grid { display: flex; flex-wrap: wrap; gap: 6px; }

.sched-status-btn {
  font-size: 11px !important;
  padding: 4px 9px !important;
  border-radius: 5px !important;
  flex: 1 1 auto;
  white-space: nowrap;
  min-width: 0;
}
.sched-status-btn--active {
  background: var(--accent-dim) !important;
  color: var(--accent) !important;
  border-color: rgba(126,232,162,0.4) !important;
  font-weight: 600 !important;
}

/* Reschedule modal layout */
.resched-pickers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.resched-picker-group { display: flex; flex-direction: column; }
.resched-date-btn { width: 100%; justify-content: flex-start; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .schedule-section        { padding: 8px 16px 0; }
  .schedule-header-controls{ gap: 4px; }
  .schedule-period-label   { min-width: 100px; font-size: 11px; }
  .sched-slot-name         { font-size: 10px; }
}

@media (max-width: 640px) {
  .schedule-header-controls{ flex-wrap: wrap; }
  .sched-col-date          { font-size: 14px; }
  .sched-cal-cell          { min-height: 52px; }
}

/* ===== SESSION TYPE BADGE (slot meta row) ===== */
.sched-type-badge {
  display: inline-block;
  font-size: 9px;
  font-family: var(--font-mono);
  font-weight: 500;
  padding: 1px 5px;
  border-radius: 3px;
  vertical-align: middle;
  margin-left: -3px;
  letter-spacing: 0.03em;
  line-height: 1.5;
}
.sched-type-badge--group {
  background: rgba(154,117,234,0.18);
  color: #9a75ea;
  border: 1px solid rgba(154,117,234,0.3);
}
.sched-type-badge--stretch {
  background: rgba(72,187,120,0.18);
  color: #48bb78;
  border: 1px solid rgba(72,187,120,0.3);
}

/* ============================================================
   TIME GRID  --  week / biweek views
   sched-tg-* classes; existing sched-slot-* classes reused.
   ============================================================ */

/* ── Outer scroll container ───────────────────────────────── */
.sched-tg {
  overflow: auto;
  max-height: min(640px, calc(100dvh - 200px));
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-2);
  position: relative;
  /* Smooth momentum scroll on iOS */
  -webkit-overflow-scrolling: touch;
}

/* ── Sticky column-header row ─────────────────────────────── */
.sched-tg-head {
  display: flex;
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg-3);
  border-bottom: 2px solid var(--border);
  /* Needs min-width so it stretches to the full content width */
  min-width: max-content;
}

/* Corner: sticks to both top AND left */
.sched-tg-corner {
  width: 44px;
  min-width: 44px;
  flex-shrink: 0;
  position: sticky;
  left: 0;
  z-index: 12;
  background: var(--bg-3);
  border-right: 1px solid var(--border);
}

.sched-tg-col-head {
  flex: 1;
  padding: 8px 4px 6px;
  text-align: center;
  border-left: 1px solid var(--border);
  position: relative;
  box-sizing: border-box;
}

.sched-tg-col-head-today {
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-3));
}
.sched-tg-col-head-today .sched-col-date { color: var(--accent); }

/* ── Grid body row ────────────────────────────────────────── */
.sched-tg-body {
  display: flex;
  min-width: max-content;
}

/* ── Time gutter ──────────────────────────────────────────── */
.sched-tg-gutter {
  width: 44px;
  min-width: 44px;
  flex-shrink: 0;
  position: sticky;
  left: 0;
  z-index: 5;
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  /* Height stretches via flex to match tallest day column */
}

.sched-tg-hour-lbl {
  position: absolute;
  right: 5px;
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-2);
  /* Centre the label on the hour line */
  transform: translateY(-50%);
  white-space: nowrap;
  pointer-events: none;
  line-height: 1;
}
/* First label (5 AM) sits at top:0 - don't shift it upward or it hides under the header */
.sched-tg-hour-lbl:first-child {
  transform: translateY(0);
}

/* ── Day columns container ────────────────────────────────── */
.sched-tg-day-cols {
  display: flex;
  flex: 1;
  min-width: 0;
}

/* ── Individual day column ────────────────────────────────── */
.sched-tg-day-col {
  flex: 1;
  position: relative;   /* containing block for absolute slots + lines */
  border-left: 1px solid var(--border);
  box-sizing: border-box;
  /* height set inline by JS = TG_GRID_H (1216px) */
}

.sched-tg-today {
  background: color-mix(in srgb, var(--accent) 3%, var(--bg-2));
}

/* ── Hour / half-hour lines ───────────────────────────────── */
.sched-tg-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
  pointer-events: none;
  z-index: 0;
}
.sched-tg-line-half {
  opacity: 0.3;
}

/* ── Current-time indicator ───────────────────────────────── */
.sched-tg-now-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  z-index: 4;
  pointer-events: none;
}
.sched-tg-now-dot {
  position: absolute;
  left: -5px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}

/* ── Absolutely positioned slot cards ────────────────────── */
.sched-tg-slot {
  position: absolute;
  box-sizing: border-box;
  overflow: hidden;
  /* Reset padding; inner div handles it */
  padding: 0;
  border: 1px solid var(--border-light, var(--border));
  border-left: 3px solid var(--slot-color);
}
/* Inner wrapper controls padding and layout */
.sched-tg-slot-inner {
  height: 100%;
  overflow: hidden;
  box-sizing: border-box;
  padding: 3px 5px 2px 8px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

/* Slot text density tweaks for the time grid */
.sched-tg-slot .sched-slot-top-row  { gap: 2px; align-items: flex-start; }
.sched-tg-slot .sched-slot-time     { font-size: 9px; line-height: 1.2; }
.sched-tg-slot .sched-slot-name     { font-size: 11px; line-height: 1.2; flex-shrink: 0; }
.sched-tg-slot .sched-slot-meta     { font-size: 9px; line-height: 1.2; flex-shrink: 0; }
.sched-tg-slot .sched-slot-paid-badge { font-size: 8px; padding: 1px 3px; }

/* Smart Start sessions: distinct amber/gold tinted background */
.sched-slot.sched-slot--smartstart {
  background: rgba(255, 201, 92, 0.13) !important;
  border-left-color: #ffc95c !important;
  border-color: rgba(255, 201, 92, 0.3) !important;
}
.sched-slot.sched-slot--smartstart .sched-slot-time { color: #ffc95c; }
.sched-slot.sched-slot--smartstart .sched-slot-name { color: var(--text); }
.sched-tg-slot.half-hour .sched-slot-name { font-size: 10px; }
.sched-tg-slot.half-hour .sched-slot-time { font-size: 9px; }
/* Override base .sched-slot.half-hour which sets padding on the outer element.
   In the time grid the outer element must stay padding:0; the inner handles it. */
.sched-tg-slot.half-hour { padding: 0; }

/* When overlapping, add a small gap between side-by-side slots */
.sched-tg-slot { margin-right: 1px; }

/* ── Workload bar - sticky bottom inside .sched-tg ───────── */
.sched-tg-bar-sticky {
  display: flex;
  position: sticky;
  bottom: 0;
  z-index: 6;
  background: var(--bg-3);
  border-top: 1px solid var(--border);
  min-width: max-content;
  width: 100%;
}
.sched-tg-bar-gutter {
  width: 44px;
  min-width: 44px;
  flex-shrink: 0;
  position: sticky;
  left: 0;
  z-index: 7;
  background: var(--bg-3);
  border-right: 1px solid var(--border);
}
.sched-tg-bar-cols {
  flex: 1;
  display: flex;
  gap: 0;
  height: 52px;
  align-items: end;
}
/* Override sched-bar-col to be flex children instead of grid */
.sched-tg-bar-cols .sched-bar-col {
  flex: 1;
  box-sizing: border-box;
  border-left: 1px solid var(--border);
}

/* ── Mobile overrides ─────────────────────────────────────── */
@media (max-width: 640px) {
  .sched-tg {
    max-height: min(560px, calc(100dvh - 210px));
    border-radius: 8px;
  }
  .sched-tg-corner,
  .sched-tg-gutter,
  .sched-tg-bar-gutter { width: 36px; min-width: 36px; }
  .sched-tg-hour-lbl { font-size: 9px; right: 3px; }
  .sched-tg-slot .sched-slot-name { font-size: 10px; }
}

/* ===== SCHEDULE EXPAND BUTTON (top-left corner of time grid) ===== */
.sched-tg-corner {
  display: flex;
  align-items: center;
  justify-content: center;
}

.sched-tg-expand-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  opacity: 1;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  padding: 0;
  flex-shrink: 0;
}
.sched-tg-expand-btn:hover {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: var(--accent);
}

/* ===== SCHEDULE FULLSCREEN OVERLAY ===== */
.sched-fs-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: var(--bg-1, #0f0f17);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sched-fs-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
  flex-shrink: 0;
}

.sched-fs-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.sched-fs-close-btn {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.sched-fs-close-btn:hover {
  background: rgba(248, 113, 113, 0.12);
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.35);
}

.sched-fs-grid {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 12px 16px;
}

/* Make the time grid fill the fullscreen container */
.sched-fs-grid .sched-tg {
  max-height: none;
  flex: 1;
  height: 100%;
  border-radius: 10px;
}

/* Hide the expand button when inside fullscreen (replaced by header X) */
.sched-fs-grid .sched-tg-expand-btn {
  display: none;
}
