/* Public availability calendar and its buttons: a clean, professional layout that keeps the maroon, gold and ivory theme.
   Loaded after styles.css and calendar-past.css on the home page. Only the calendar, its key and the day panel are restyled. */

/* ---------- the card ---------- */
.cal{
  background:linear-gradient(180deg,#fffdf8 0%,#fffaf0 100%);
  border:1px solid rgba(185,133,32,.28);
  border-radius:20px;
  box-shadow:0 1px 0 rgba(255,255,255,.7) inset,0 18px 40px rgba(110,20,36,.10);
  overflow:hidden;
}

/* ---------- month header ---------- */
.cal-head{
  background:linear-gradient(135deg,var(--maroon) 0%,var(--maroon-d) 100%);
  color:#fff;
  padding:14px 16px;
  position:relative;
}
.cal-head::after{content:"";position:absolute;left:16px;right:16px;bottom:0;height:2px;background:linear-gradient(90deg,transparent,var(--gold-l),transparent);opacity:.8}
#month-label{
  font-family:var(--serif);
  font-size:clamp(1.15rem,2.4vw,1.4rem);
  font-weight:600;
  letter-spacing:.02em;
  text-align:center;
  flex:1;
}
.cal-head button{
  width:44px;height:44px;
  background:rgba(255,255,255,.12);
  border:1px solid rgba(236,208,138,.45);
  border-radius:50%;
  color:#fff;
  font-size:1.35rem;
  display:inline-grid;place-items:center;
  transition:background .2s,border-color .2s,transform .15s;
}
.cal-head button:hover:not(:disabled){background:rgba(236,208,138,.22);border-color:var(--gold-l)}
.cal-head button:active:not(:disabled){transform:scale(.96)}
.cal-head button:focus-visible{outline:3px solid var(--gold-l);outline-offset:2px}
.cal-head button:disabled{opacity:.3}

/* ---------- weekday row and grid ---------- */
.cal-grid{gap:6px;padding:12px 14px 16px}
.cal-grid .dow{
  text-align:center;
  font-size:.7rem;
  font-weight:700;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--gold-d);
  padding:6px 0 4px;
}
.day{
  aspect-ratio:auto;
  min-height:52px;
  border-radius:12px;
  border:1px solid var(--line);
  background:#fff;
  color:var(--ink);
  font-family:var(--sans);
  font-variant-numeric:tabular-nums;
  font-size:.98rem;
  font-weight:600;
  box-shadow:0 1px 2px rgba(110,20,36,.05);
  transition:transform .15s,box-shadow .2s,border-color .2s;
}
.day small{font-size:.6rem;font-weight:700;letter-spacing:.03em;margin-top:4px;color:var(--gold-d)}
.day:not(.empty):not(.past):not(.booked):not([disabled]):hover{
  transform:translateY(-1px);
  border-color:var(--gold);
  box-shadow:0 6px 14px rgba(110,20,36,.14);
}
.day:focus-visible{outline:3px solid var(--gold);outline-offset:2px;z-index:1}
.day.empty{border:0;box-shadow:none;background:transparent}
.day.available{background:#fff}
/* today: a gold ring so the eye finds it at once */
.day.today{box-shadow:0 0 0 2px var(--gold) inset}
/* the selected day: solid maroon */
.day.sel{background:var(--maroon);border-color:var(--maroon);color:#fff;box-shadow:0 8px 18px rgba(139,30,45,.28)}
.day.sel small{color:var(--gold-l)}
/* auspicious labels keep their colour meaning, with a crisper gold edge */
.day.hint{box-shadow:inset 0 0 0 2px #c9972f}
.day.sel.hint{box-shadow:inset 0 0 0 2px var(--gold-l)}
/* booked and blocked days read as closed, not as an error */
.day.booked,.day.past-blocked{cursor:not-allowed}

/* ---------- key ---------- */
.legend{
  display:flex;flex-wrap:wrap;gap:8px;
  background:linear-gradient(180deg,#fffdf8,#fbf5e9);
  border:1px solid var(--line);
  border-radius:14px;
  padding:12px 14px;
  margin:0 0 14px;
  font-size:.84rem;
  color:var(--ink);
}
.legend span{
  display:inline-flex;align-items:center;gap:7px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:999px;
  padding:4px 11px 4px 8px;
  white-space:nowrap;
}
.legend .sw{width:14px;height:14px;border-radius:50%;border:1px solid rgba(0,0,0,.08);flex:0 0 auto;display:inline-block}
.auspicious-count{
  display:inline-block;
  margin:0 0 12px;
  padding:6px 14px;
  border-radius:999px;
  background:linear-gradient(135deg,#fbf0cf,#f6e2a6);
  border:1px solid rgba(185,133,32,.4);
  color:#6e4b0f;
  font-size:.88rem;
  font-weight:600;
}
.auspicious-count:empty{display:none}

/* ---------- the chosen day's panel ---------- */
.day-status{
  margin-top:16px;
  padding:18px 18px 16px;
  border:1px solid var(--line);
  border-top:3px solid var(--gold);
  border-radius:16px;
  background:#fff;
  box-shadow:0 10px 24px rgba(110,20,36,.07);
  min-height:0;
}
.day-status-head{align-items:center}
.day-status-head b{font-family:var(--serif);font-size:1.25rem;color:var(--maroon-d);font-weight:600}
.day-status-pill{padding:5px 14px;font-size:.8rem;letter-spacing:.02em;border:1px solid transparent}
.day-status-pill.open{background:#eaf5ec;color:var(--leaf);border-color:rgba(47,107,59,.2)}
.day-status-pill.closed{background:#fbeaea;color:#8a1d1d;border-color:rgba(138,29,29,.18)}
.day-status-pill.past{background:#f1ede6;color:#6b5e55;border-color:var(--line)}
.day-status-text{color:var(--muted);font-size:.95rem;line-height:1.55}
.day-shifts{
  margin:14px 0 0;
  padding:12px 0 0;
  border-top:1px dashed var(--line);
  grid-template-columns:auto 1fr;
  font-size:.92rem;
}
.day-shifts dt{color:var(--muted);font-weight:500}
.day-shifts dd{font-weight:700}
.day-status .btn{margin-top:14px}

/* ---------- buttons in this area: maroon, gold-edged, pill ---------- */
.day-status .btn,
.cal-action{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  min-height:46px;
  padding:0 24px;
  border-radius:999px;
  border:1px solid rgba(236,208,138,.55);
  background:linear-gradient(135deg,var(--maroon) 0%,var(--maroon-d) 100%);
  color:#fff;
  font-family:var(--sans);
  font-size:.95rem;
  font-weight:600;
  letter-spacing:.03em;
  text-decoration:none;
  box-shadow:0 8px 18px rgba(110,20,36,.22),inset 0 1px 0 rgba(255,255,255,.18);
  cursor:pointer;
  transition:transform .15s,box-shadow .2s,filter .2s;
}
.day-status .btn:hover,.cal-action:hover{transform:translateY(-1px);box-shadow:0 12px 24px rgba(110,20,36,.28),inset 0 1px 0 rgba(255,255,255,.18);filter:brightness(1.04)}
.day-status .btn:active,.cal-action:active{transform:translateY(0)}
.day-status .btn:focus-visible,.cal-action:focus-visible{outline:3px solid var(--gold);outline-offset:3px}

/* ---------- phones: bigger targets, simpler spacing ---------- */
@media (max-width:520px){
  .cal-grid{gap:4px;padding:8px 8px 12px}
  .day{min-height:46px;border-radius:10px;font-size:.92rem}
  .day small{font-size:.55rem}
  .cal-head{padding:12px 10px}
  .legend{gap:6px;padding:10px}
  .legend span{font-size:.8rem}
  .day-status{padding:16px 14px}
  .day-status .btn{width:100%}
}
@media (prefers-reduced-motion:reduce){
  .day,.day-status .btn,.cal-action,.cal-head button{transition:none}
  .day:hover,.day-status .btn:hover{transform:none}
}

/* the key's colour swatches reuse the day classes; keep them small and round */
.legend .sw.day{min-height:0;aspect-ratio:auto;width:14px;height:14px;border-radius:50%;box-shadow:none;transform:none;padding:0;margin:0}

/* the month title is light on the maroon header */
#month-label{color:#fff !important;font-weight:600}

/* availability by session: three cards */
.day-shifts-title{margin:16px 0 10px;font-size:.72rem;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:var(--gold-d)}
.day-shifts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:0;padding:0;border:0}
.shift-card{display:flex;flex-direction:column;gap:6px;padding:12px 12px 11px;border-radius:14px;border:1px solid var(--line);background:#fffdf8;position:relative;overflow:hidden}
.shift-card::before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--line)}
.shift-card-name{font-size:.8rem;font-weight:600;color:var(--muted);letter-spacing:.02em}
.shift-card-state{font-family:var(--serif);font-size:1.05rem;font-weight:600}
.shift-card.shift-free{background:#f3faf4;border-color:rgba(47,107,59,.22)}
.shift-card.shift-free::before{background:var(--leaf)}
.shift-card.shift-free .shift-card-state{color:var(--leaf)}
.shift-card.shift-held{background:#fdf7e4;border-color:rgba(185,133,32,.35)}
.shift-card.shift-held::before{background:var(--gold)}
.shift-card.shift-held .shift-card-state{color:#7a5410}
.shift-card.shift-booked,.shift-card.shift-not-available{background:#fbf1f1;border-color:rgba(139,30,45,.2)}
.shift-card.shift-booked::before,.shift-card.shift-not-available::before{background:var(--maroon)}
.shift-card.shift-booked .shift-card-state,.shift-card.shift-not-available .shift-card-state{color:var(--maroon)}
@media (max-width:520px){.day-shifts{grid-template-columns:1fr}.shift-card{flex-direction:row;align-items:center;justify-content:space-between}}

/* day panel in Inter: clear and easy to read; session states as pills */
.day-status,.day-status-head b,.day-status-text,.day-shifts-title,.shift-card,.shift-card-name,.shift-card-state,.day-status-pill{font-family:"Inter",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif}
.day-status-head b{font-size:1.1rem;font-weight:700;letter-spacing:-.01em;color:var(--ink)}
.day-status-text{font-size:.95rem}
.shift-card{padding:14px 14px 14px 16px;gap:10px;border-radius:14px;background:#fff}
.shift-card::before{width:3px}
.shift-card-name{font-size:.82rem;font-weight:600;color:var(--muted)}
.shift-card-state{display:inline-flex;align-items:center;gap:7px;align-self:flex-start;padding:5px 12px 5px 10px;border-radius:999px;font-size:.82rem;font-weight:600;letter-spacing:.01em;background:#eef2ee;color:#2e4a33}
.shift-card-state::before{content:"";width:7px;height:7px;border-radius:50%;background:currentColor;opacity:.9}
.shift-card.shift-free .shift-card-state{background:#e5f4e8;color:#1f6b35}
.shift-card.shift-held .shift-card-state{background:#fbefc8;color:#7a5410}
.shift-card.shift-booked .shift-card-state,.shift-card.shift-not-available .shift-card-state{background:#f8e0e2;color:#8a1d1d}
.shift-card.shift-held,.shift-card.shift-free,.shift-card.shift-booked,.shift-card.shift-not-available{background:#fff;border-color:var(--line)}
.shift-card.shift-free::before{background:#1f6b35}
.shift-card.shift-held::before{background:var(--gold)}
.shift-card.shift-booked::before,.shift-card.shift-not-available::before{background:#8a1d1d}
.day-status-pill{border-radius:999px;font-weight:600;letter-spacing:.01em;padding:6px 14px;font-size:.82rem}

/* sessions on the public day panel: name, hours and price */
.shift-card{gap:4px}
.shift-card-time{font-size:.86rem;color:var(--muted,#6b5e5a)}
.shift-card-price{margin-top:6px;font-size:.98rem;font-weight:700;color:var(--maroon-d,#6e1424)}
