/* =============================================================================
   Lash by Rita — schedule calendar (see js/schedule.js).
   Shared by the booking form and the admin page. Plum card, cream pill,
   paper panel. Fallbacks let it work with either page's colour variables.
   ========================================================================== */
.sched {
  --sc-ink: var(--ink, #3a2230);
  --sc-cream: var(--cream, #fbf6f1);
  --sc-paper: var(--paper, #fffdfb);
  --sc-blush: var(--blush, #f7e6e5);
  --sc-rose: var(--rose, #c76d86);
  --sc-rose-deep: var(--rose-deep, #a9506b);
  --sc-rose-soft: var(--rose-soft, #ebb9c6);
  --sc-mauve: var(--mauve, #7a5d6d);
  --sc-ease: cubic-bezier(0.22, 1, 0.36, 1);
  width: 100%; max-width: 520px;
  padding: 4px; padding-top: 18px;
  border-radius: 26px;
  background: var(--sc-ink);
  box-shadow: 0 24px 48px -16px rgba(58, 34, 48, 0.35), 0 4px 12px -2px rgba(58, 34, 48, 0.14);
  user-select: none; -webkit-user-select: none;
}

.sched-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 12px 12px 18px; }
.sched-month { margin: 0; font-family: var(--serif, Georgia, serif); font-size: 22px; font-weight: 500; line-height: 1.2; color: var(--sc-cream); }
.sched-nav { display: flex; align-items: center; gap: 4px; }
.sched-arrow, .sched-today {
  display: grid; place-items: center; height: 40px; min-width: 40px; padding: 0;
  border: 0; border-radius: 999px; background: rgba(251, 246, 241, 0.08); color: var(--sc-cream);
  font: 500 13px/1 var(--sans, system-ui, sans-serif); cursor: pointer;
  transition: transform 160ms var(--sc-ease), background-color 200ms ease, opacity 200ms ease;
}
.sched-today { padding: 0 14px; margin-right: 4px; }
.sched-arrow svg { width: 18px; height: 18px; }
.sched-arrow:active:not([disabled]), .sched-today:active { transform: scale(0.94); }
.sched-arrow[disabled] { opacity: 0.25; cursor: default; }

/* days */
.sched-days { position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); align-items: start; padding: 0 8px 10px; }
.sched-col { display: flex; flex-direction: column; align-items: center; }
.sched-wd { margin-bottom: 8px; font-size: 12px; font-weight: 500; color: rgba(251, 246, 241, 0.62); }
.sched-col:last-child .sched-wd { color: var(--sc-rose-soft); }
.sched-day {
  position: relative; z-index: 1;
  display: grid; place-items: center; width: 40px; height: 40px; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: rgba(251, 246, 241, 0.88);
  font: 400 14px/1 var(--sans, system-ui, sans-serif); font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: transform 160ms var(--sc-ease), color 150ms ease, background-color 150ms ease;
}
.sched-day:active:not([disabled]) { transform: scale(0.92); }
.sched-day:focus-visible { outline: 2px solid rgba(251, 246, 241, 0.75); outline-offset: 2px; }
.sched-day.today .sched-num { color: var(--sc-rose-soft); font-weight: 600; }
.sched-day[disabled] { color: rgba(251, 246, 241, 0.26); cursor: default; }
.sched-day.struck[disabled] .sched-num { text-decoration: line-through; text-decoration-color: rgba(251, 246, 241, 0.3); }
.sched-day[aria-selected="true"], .sched-day[aria-selected="true"] .sched-num { color: var(--sc-ink); font-weight: 600; }

/* the one pill that glides to the chosen day (positioned by js) */
.sched-pill {
  position: absolute; left: 0; top: 0; z-index: 0;
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(180deg, #ffffff, var(--sc-cream) 55%, var(--sc-blush));
  box-shadow: 0 2px 8px rgba(20, 8, 14, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  opacity: 0; pointer-events: none;
  transition: transform 380ms cubic-bezier(0.32, 0.72, 0, 1), opacity 160ms ease;
}
.sched-pill.on { opacity: 1; }

.sched-dot { width: 4px; height: 4px; margin-top: 5px; border-radius: 50%; background: var(--sc-rose-soft); opacity: 0; transform: scale(0); transition: opacity 160ms var(--sc-ease), transform 160ms var(--sc-ease); }
.sched-dot.has { opacity: 1; transform: scale(1); }
.sched-col.is-on .sched-dot { opacity: 0; transform: scale(0); }

/* panel */
.sched-panel { position: relative; overflow: hidden; border-radius: 22px; background: var(--sc-paper); }
.sched-content { min-height: 100%; }
.sched-list { margin: 0; padding: 4px 20px; list-style: none; }
.sched-list > li + li { border-top: 1px solid rgba(58, 34, 48, 0.07); }

.sched-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
  padding: 16px 0; border: 0; background: none; color: inherit; text-align: left;
  font: inherit; cursor: pointer;
  transition: transform 160ms var(--sc-ease);
}
.sched-row:active:not([disabled]) { transform: scale(0.98); }
.sched-row:focus-visible { outline: 2px solid var(--sc-rose-deep); outline-offset: -2px; border-radius: 12px; }
.sched-row-main { min-width: 0; }
.sched-row-t { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 600; color: var(--sc-ink); }
.sched-row-s { display: block; margin-top: 3px; font-size: 13px; color: #8e7c86; font-variant-numeric: tabular-nums; }
.sched-row > svg { flex: none; width: 16px; height: 16px; color: #c4b3bc; transition: transform 160ms var(--sc-ease), color 150ms ease; }
.sched-row[disabled] { cursor: default; }
.sched-row[disabled] .sched-row-t { color: #b9a8b1; text-decoration: line-through; text-decoration-color: rgba(58, 34, 48, 0.2); }
.sched-row[aria-pressed="true"] .sched-row-t { color: var(--sc-rose-deep); }
.sched-row[aria-pressed="true"] .sched-row-s { color: var(--sc-rose-deep); }
.sched-row[aria-pressed="true"] > svg { color: var(--sc-rose-deep); }
@media (hover: hover) and (pointer: fine) {
  .sched-arrow:hover:not([disabled]), .sched-today:hover { background: rgba(251, 246, 241, 0.16); }
  .sched-day:hover:not([disabled]):not([aria-selected="true"]) { color: #fff; background: rgba(251, 246, 241, 0.08); }
  .sched-row:hover:not([disabled]) > svg { transform: translateX(2px); color: var(--sc-mauve); }
}

/* expandable details (admin) */
.sched-more { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows 220ms var(--sc-ease), opacity 180ms ease; }
.sched-more > div { overflow: hidden; }
.sched-item.open .sched-more { grid-template-rows: 1fr; opacity: 1; }
.sched-item.open .sched-row > svg { transform: rotate(90deg); }

.sched-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 180px; padding: 24px 20px; text-align: center; }
.sched-empty p { margin: 0; }
.sched-empty .big { font-size: 15px; font-weight: 500; color: #6e5a66; }
.sched-empty .small { font-size: 13px; color: #a3919b; }
.sched-empty button { margin-top: 10px; }

/* loading shimmer rows */
.sched-skel { height: 18px; margin: 20px 0; border-radius: 9px; background: linear-gradient(90deg, #f3ebe6, #faf5f1, #f3ebe6); background-size: 200% 100%; animation: sched-shimmer 1.2s linear infinite; }
.sched-skel:nth-child(2n) { width: 70%; }
@keyframes sched-shimmer { to { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) {
  .sched-pill, .sched-dot, .sched-more { transition: none; }
  .sched-skel { animation: none; }
  .sched-day:active:not([disabled]), .sched-row:active:not([disabled]), .sched-arrow:active:not([disabled]) { transform: none; }
}
