/* ================================
   Light mode refinements (default)
   ================================ */
:root{
  --brand-color:#0b5bd3; --brand-ink:#0f172a; --muted-ink:#475569;
  --card-bg:#f7fbff; --card-border:#dbe7f3;
  --surface:#f3f6fa; --surface-2:#eef3f9;
}

/* Card */
.intro-session{ max-width:960px; margin:2rem auto; padding:2rem;
  background:var(--card-bg); border:1px solid var(--card-border);
  border-radius:14px; box-shadow:0 6px 24px rgba(15,23,42,.06); }
.intro-session h1,.intro-session h2{ color:var(--brand-ink); letter-spacing:.3px; }
.intro-session p,.intro-session ul{ color:var(--muted-ink); }

/* Calendar container */
#calendar{ max-width:900px; margin:1.25rem auto; padding:1rem;
  background:var(--surface); border-radius:8px; box-shadow:0 8px 30px rgba(15,23,42,.06); }

/* Legend */
.calendar-legend{ max-width:900px; margin:.25rem auto 1rem; display:flex; gap:1.25rem; align-items:center;
  color:var(--muted-ink); font-weight:600; font-size:.95rem; }
.calendar-legend .swatch{ width:18px; height:10px; border-radius:999px; display:inline-block; margin-right:.45rem;
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.1); }
.calendar-legend .available{ background:#22c55e; }
.calendar-legend .booked{ background:#9ca3af; }

/* --- FullCalendar light theming --- */
.fc{ color:var(--brand-ink); }
.fc-theme-standard .fc-scrollgrid{ border-color:#e2e8f0; }
.fc-theme-standard td,.fc-theme-standard th{ border-color:#e2e8f0; }

/* Header row */
.fc-col-header,.fc-col-header-cell{ background:var(--surface-2); }
.fc-col-header-cell-cushion{ color:#334155; font-weight:600; }

/* Today highlight */
.fc .fc-day-today{ background:#eaf3ff; }

/* Time axis + slot height */
.fc-timegrid-axis{ color:#64748b; background:transparent; }
.fc-timegrid-slot{ height:3em; }

/* Toolbar buttons */
.fc .fc-toolbar-title{ color:var(--brand-ink); }
.fc .fc-button-primary{ background:#e9f1ff; border-color:#cfe1ff; color:#0b5bd3; }
.fc .fc-button-primary:hover,.fc .fc-button-primary:focus{ background:#dbe9ff; border-color:#c2d9ff; }
.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active{ background:#0b5bd3; border-color:#0b5bd3; color:#fff; }


/* Event pills – style FC's native label only */
.fc-timegrid-event { border-radius: 12px; }

/* Use the correct wrapper for timeGrid: .fc-event-main-frame */
.fc .fc-timegrid-event .fc-event-main-frame{
  padding: 4px 8px !important;       /* tighter pill padding */
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
  font-size: 0.85rem !important;     /* base downsize (desktop) */
  font-weight: 700 !important;       /* less heavy than 800 */
}

/* Hide title entirely; we only want the time */
.fc .fc-timegrid-event .fc-event-title{ display: none !important; }


/* FullCalendar v6 timeGrid puts the label inside .fc-event-main-frame */
.fc .fc-timegrid-event .fc-event-main-frame{
  padding: 4px 8px !important;            /* tighter pill padding */
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
}

/* The time text itself */
.fc .fc-timegrid-event .fc-event-time{
  white-space: nowrap !important;          /* never wrap */
  font-weight: 700 !important;             /* lighter than 800 so it looks smaller */
  font-size: 0.82rem !important;           /* smaller on desktop already */
  letter-spacing: 0;
  text-shadow: none;                       /* removing bulk makes it read smaller */
  color: #fff;
}

/* Some themes inject a joiner after the time (the trailing dash) – kill it */
.fc .fc-timegrid-event .fc-event-time::after{
  content: none !important;
}

/* Better contrast on grey (Booked) chips */
.fc .fc-timegrid-event[style*="#9ca3af"] .fc-event-time,
.fc .fc-timegrid-event[style*="rgb(156, 163, 175)"] .fc-event-time{
  color:#111827 !important;
}

/* Tablet downscale */
@media (max-width: 1024px){
  .fc .fc-timegrid-event .fc-event-main-frame{
    padding: 3px 7px !important;
  }
  .fc .fc-timegrid-event .fc-event-time{
    font-size: 0.78rem !important;
  }
}

/* Phone downscale (guaranteed fit) */
@media (max-width: 640px){
  .fc .fc-timegrid-event .fc-event-main-frame{
    padding: 2px 6px !important;
  }
  .fc .fc-timegrid-event .fc-event-time{
    font-size: 0.72rem !important;
  }
}

/* --- How it works block --- */
.how-it-works{
  max-width:900px;
  margin: 0.5rem auto 1.25rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(15,23,42,.04);
}
.how-it-works h2{
  margin: 0 0 .75rem;
  color: var(--brand-ink);
  font-size: 1.15rem;
}

.hiw-steps{
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: .75rem 1rem;
}
.hiw-steps li{
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: start;
  gap: .6rem;
}
.step-badge{
  display: inline-grid;
  place-items: center;
  width: 28px; height: 28px;
  border-radius: 999px;
  background: var(--brand-color);
  color: #fff;
  font-weight: 700;
  font-size: .9rem;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(11,91,211,.18);
}

.hiw-notes{
  margin: .75rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted-ink);
  font-size: .95rem;
  display: grid;
  gap: .25rem;
}
.hiw-notes li::before{
  content: "✔";
  color: #22c55e;
  margin-right: .5rem;
}

/* Responsive */
@media (max-width: 640px){
  .hiw-steps{ grid-template-columns: 1fr; }
  .how-it-works{ padding: .85rem 1rem; }
}

/* Dark mode */
html.dark-mode .how-it-works{
  background: #0b1221;
  border-color: #1f2937;
  box-shadow: 0 0 0 1px #1f2937;
}
html.dark-mode .hiw-notes li::before{ color: #22c55e; }



/* ---------- Dark mode ---------- */
html.dark-mode .intro-session{ background:#0f172a; color:#e5e7eb; box-shadow:0 0 0 1px #1f2937; }
html.dark-mode .intro-session h1,html.dark-mode .intro-session h2{ color:#60a5fa; }
html.dark-mode #calendar{ background:#0b1221; box-shadow:0 0 0 1px #1f2937; }
html.dark-mode .fc{ color:#e5e7eb; }
html.dark-mode .fc-theme-standard .fc-scrollgrid,
html.dark-mode .fc-theme-standard td,html.dark-mode .fc-theme-standard th{ border-color:#1f2937; }
html.dark-mode .fc-col-header,.html.dark-mode .fc-col-header-cell{ background:#0f172a; }
html.dark-mode .fc-col-header-cell-cushion{ color:#cbd5e1; }
html.dark-mode .fc .fc-day-today{ background:rgba(255,255,255,.06); }
html.dark-mode .calendar-legend{ color:#cbd5e1; }
html.dark-mode .calendar-legend .swatch{ box-shadow:inset 0 0 0 1px rgba(255,255,255,.08); }
html.dark-mode .fc .fc-timegrid-axis,html.dark-mode .fc .fc-timegrid-allday{
  background:#0f172a; border-color:#1f2937; color:#94a3b8;
}

/* ---------- Responsive tweaks ---------- */
@media (max-width:1024px){
  #calendar,.calendar-legend{ max-width:100%; }
  .fc .fc-toolbar-title{ font-size:1.05rem; }
  .fc-col-header-cell-cushion{ font-size:.9rem; }
  .fc-timegrid-slot{ height:2.6em; }
  .fc-timegrid-event .fc-event-time{ font-size:.84rem; }
  .fc-timegrid-event .fc-event-main{ padding:5px 8px; }
}

@media (max-width:640px){
  .intro-session{ padding:1rem; border-radius:12px; }
  .calendar-legend{ flex-wrap:wrap; gap:.75rem; font-size:.9rem; }
  .fc .fc-toolbar{ gap:.25rem; }
  .fc .fc-button{ padding:.25rem .5rem; font-size:.85rem; }
  .fc .fc-toolbar-title{ font-size:1rem; }
  .fc-timegrid-allday{ display:none; }
  .fc-timegrid-slot{ height:2.3em; }
  .fc .fc-timegrid-axis-cushion{ font-size:.8rem; }
  .fc-col-header-cell-cushion{ font-size:.85rem; }

  /* Smaller, tighter chips on phones */
  .fc-timegrid-event .fc-event-time{ font-size:.78rem; letter-spacing:0; }
  .fc-timegrid-event .fc-event-main{ padding:4px 6px; }
}

/* --- Dark mode fixes: header strip + toolbar buttons --- */

/* Header row (days) + little corner cells */
html.dark-mode .fc .fc-col-header,
html.dark-mode .fc .fc-col-header thead,
html.dark-mode .fc .fc-col-header-cell,
html.dark-mode .fc .fc-timegrid-axis,
html.dark-mode .fc .fc-timegrid-allday,
html.dark-mode .fc .fc-timegrid-divider {
  background-color: #0f172a !important;
}

/* Borders in the whole grid */
html.dark-mode .fc-theme-standard .fc-scrollgrid,
html.dark-mode .fc-theme-standard td,
html.dark-mode .fc-theme-standard th {
  border-color: #1f2937 !important;
}

/* “Disabled” day (if FC marks it) */
html.dark-mode .fc .fc-day-disabled {
  background: #0b1221 !important;
  color: #94a3b8 !important;
}

/* Toolbar buttons (today / prev / next) */
html.dark-mode .fc .fc-button-primary {
  background-color: #1f2937 !important;
  border-color: #334155 !important;
  color: #e5e7eb !important;
}
html.dark-mode .fc .fc-button-primary:hover,
html.dark-mode .fc .fc-button-primary:focus {
  background-color: #334155 !important;
  border-color: #475569 !important;
}
html.dark-mode .fc .fc-button-primary:not(:disabled).fc-button-active,
html.dark-mode .fc .fc-button-primary:not(:disabled):active {
  background-color: #0ea5e9 !important;
  border-color: #0ea5e9 !important;
  color: #0b1221 !important;
}
html.dark-mode .fc .fc-button-primary:disabled {
  background-color: #111827 !important;
  border-color: #1f2937 !important;
  color: #6b7280 !important;
}
