/* ==========================================================================
   Calendar — card-style date picker (matches Bounce at PARQAL reference)
   Kept the same class names (.mini-cal-grid, .mini-cal-day, etc.) so the
   existing minicalendar.js works with zero changes.
   ========================================================================== */

:root {
  --cal-accent: #8d1010;        /* teal selected-date background */
  --cal-accent-text: #ffffff;
  --cal-text: #1a2332;          /* dark navy for active dates/header */
  --cal-muted: #b9bec7;         /* light gray for disabled/past dates */
  --cal-arrow: #a8998a;         /* muted tan chevrons */
  --cal-card-bg: #ffffff;
  --cal-radius: 20px;
  --cal-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.cal-rail {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  width: 100%;
  max-width: 360px;
  height: 350px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  background: var(--cal-card-bg);
  border-radius: var(--cal-radius);
  box-shadow: var(--cal-shadow);
  padding: 18px 20px;
}
 
/* ---- Header (month title + prev/next arrows) ---- */
.cal-rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-shrink: 0; /* header keeps its natural height, grid below fills the rest */
}
 
.cal-rail-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--cal-text);
  letter-spacing: 0.2px;
}
 
.cal-rail-head .mail-tool {
  background: none;
  border: none;
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--cal-arrow);
  font-size: 18px;
  border-radius: 6px;
  transition: opacity 0.15s ease;
}
 
.cal-rail-head .mail-tool:hover {
  opacity: 0.7;
}
 
/* ---- Grid ----
   flex: 1 makes this fill whatever height remains under the header inside
   the fixed 300px .cal-rail. grid-template-rows reserves 6 equal day-rows
   (plus the weekday label row) regardless of whether the month needs 5 or
   6 rows, so the card height never shifts between months. */
.mini-cal-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: auto repeat(6, 1fr);
  row-gap: 2px;
  column-gap: 2px;
  min-height: 0; /* required for flex children to actually shrink/fit */
}
 
/* Weekday header labels — M T W T F S S */
.mini-cal-wd {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--cal-text);
  padding-bottom: 4px;
}
 
/* ---- Day cells ---- */
.mini-cal-day {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--cal-text);
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}
 
.mini-cal-day:hover {
  background-color: #f2f5f6;
}
 
/* Days belonging to previous/next month (kept blank/invisible like the
   reference image — remove this rule if you'd rather show them dimmed) */
.mini-cal-day.is-other {
  visibility: hidden;
  cursor: default;
}
 
/* Today */
.mini-cal-day.is-today {
  color: var(--cal-accent);
}
 
/* Selected date — filled teal pill */
.mini-cal-day.is-selected {
  background-color: var(--cal-accent);
  color: var(--cal-accent-text);
}
 
.mini-cal-day.is-selected:hover {
  background-color: var(--cal-accent);
  opacity: 0.9;
}
 
/* Has an event/reservation dot */
.mini-cal-day.has-event:not(.is-selected)::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: var(--cal-accent);
}
 
/* ---- Fully booked / disabled dates — light gray + strikethrough,
   matching the reference image's past/unavailable date treatment ---- */
.mini-cal-day.is-full {
  color: var(--cal-muted);
  font-weight: 500;
  cursor: not-allowed;
  pointer-events: none;
  text-decoration: line-through;
  text-decoration-color: var(--cal-muted);
  text-decoration-thickness: 1px;
}
 
.mini-cal-day.is-full:hover {
  background-color: transparent;
}
 
/* Optional: same treatment for past dates (dates before today), to match
   the reference image where 1–14 Aug are shown disabled/struck-through.
   Add an `is-past` class in minicalendar.js's render() if you want this —
   see note below. */
.mini-cal-day.is-past {
  color: var(--cal-muted);
  font-weight: 500;
  cursor: not-allowed;
  pointer-events: none;
  text-decoration: line-through;
  text-decoration-color: var(--cal-muted);
}
 
.mini-cal-day.is-past:hover {
  background-color: transparent;
}
 
/* ==========================================================================
   Responsive — tablet and phone
   ========================================================================== */
 
/* Tablet (e.g. iPad portrait and smaller)
   Height reverts to auto here — the fixed 300px on .cal-rail is a
   desktop-only sizing choice; on tablet/phone the card sizes to content. */
@media (max-width: 768px) {
  .cal-rail {
    max-width: 320px;
    height: auto;
    padding: 20px;
    border-radius: 18px;
  }
 
  .mini-cal-grid {
    grid-template-rows: auto repeat(6, auto);
    row-gap: 10px;
  }
 
  .cal-rail-title {
    font-size: 16px;
  }
 
  .mini-cal-wd {
    font-size: 12px;
  }
 
  .mini-cal-day {
    font-size: 13px;
    padding: 7px 0;
  }
}
 
/* Phone */
@media (max-width: 480px) {
  .cal-rail {
    max-width: 100%;
    width: 100%;
    height: auto;
    padding: 16px;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  }
 
  .cal-rail-head {
    margin-bottom: 14px;
  }
 
  .cal-rail-title {
    font-size: 15px;
  }
 
  .cal-rail-head .mail-tool {
    width: 24px;
    height: 24px;
    font-size: 16px;
  }
 
  .mini-cal-grid {
    row-gap: 8px;
    column-gap: 0;
  }
 
  .mini-cal-wd {
    font-size: 11px;
    padding-bottom: 2px;
  }
 
  .mini-cal-day {
    font-size: 12px;
    padding: 6px 0;
    border-radius: 8px;
  }
 
  .mini-cal-day.has-event:not(.is-selected)::after {
    width: 3px;
    height: 3px;
    bottom: 1px;
  }
}
 
/* Very small phones */
@media (max-width: 360px) {
  .cal-rail {
    padding: 12px;
  }
 
  .mini-cal-day {
    font-size: 11px;
    padding: 5px 0;
  }
 
  .mini-cal-wd {
    font-size: 10px;
  }
}