/* Onyx native booking widget. Layers interactivity + booking form on top of the
   existing .rv-cal / .rv-slots design used by the contact-page mock. */

.rv-cal-live { min-height: 300px; }
.cal-loading { padding: 60px 12px; text-align: center; color: var(--text-dim, #6b5b80); font-size: 16px; }

/* step flow: back button + step title (each step replaces the area) */
.cal-step-head { margin-bottom: 12px; }
.cal-back { display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; padding: 6px 4px; margin-left: -4px; cursor: pointer; color: var(--royal, #56216e); font-family: inherit; font-size: 15px; font-weight: 600; }
.cal-back:hover { text-decoration: underline; }
.cal-step-title { font-family: var(--font-display, 'Sora', sans-serif); font-size: 18px; font-weight: 700; color: var(--ink, #2a0c44); margin-bottom: 14px; }

/* month header + nav */
.rv-cal-month { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cal-nav { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line, #e3d8f0); background: #fff; color: var(--royal, #56216e); font-size: 20px; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: background .15s, border-color .15s; }
.cal-nav:hover:not(:disabled) { background: var(--grad-soft, #f4eefb); border-color: var(--violet, #7c3aed); }
.cal-nav:disabled { opacity: .35; cursor: default; }

/* clickable days + slots */
.rv-cal-grid .day.free { cursor: pointer; transition: background .12s, color .12s; }
.rv-cal-grid .day.free:hover { background: var(--grad-soft, #f4eefb); }
.rv-cal-grid .day.free:focus-visible,
.rv-slot:focus-visible { outline: 2px solid var(--violet, #7c3aed); outline-offset: 2px; }
.slot-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.rv-slot { cursor: pointer; transition: background .12s, color .12s, border-color .12s; }
.rv-slot:hover { border-color: var(--violet, #7c3aed); }
.rv-slot.sel { background: var(--royal, #56216e); border-color: var(--royal, #56216e); color: #fff; }

/* booking form */
.cal-book { margin-top: 18px; }
.cal-form { display: flex; flex-direction: column; gap: 10px; }
.cal-form-when { font-weight: 700; color: var(--royal, #56216e); font-size: 16px; margin-bottom: 2px; }
.cal-form input, .cal-form select, .cal-form textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--line, #e3d8f0); border-radius: 10px; font-size: 16px; font-family: inherit; background: #fff; color: var(--ink, #2a0c44); }
.cal-form textarea { resize: vertical; min-height: 72px; }
.cal-form input::placeholder, .cal-form textarea::placeholder { color: #9b94ad; }
.cal-form select:invalid { color: #9b94ad; }
.cal-form input:focus, .cal-form select:focus, .cal-form textarea:focus { outline: none; border-color: var(--violet, #7c3aed); box-shadow: 0 0 0 3px rgba(124, 58, 237, .15); }
.cal-confirm { width: 100%; justify-content: center; margin-top: 2px; }
.cal-err { color: #c0392b; font-size: 14px; }

/* confirmation */
.cal-done { text-align: center; padding: 28px 16px; }
.cal-done-ic { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 50%; background: var(--grad, linear-gradient(120deg,#c8268c,#7c3aed 58%,#56216e)); color: #fff; font-size: 28px; line-height: 56px; }
.cal-done h3 { font-size: 22px; margin: 0 0 8px; color: var(--royal, #56216e); }
.cal-done p { font-size: 16px; color: var(--text, #2a0c44); margin: 0; max-width: 44ch; margin-inline: auto; }

/* Center the live widget in the scheduler column (the .rv-sched-embed grid was
   built for the old two-up mock; the live widget is a single centered column). */
.rv-sched-col { text-align: center; }
.rv-sched-col .rv-sched-head { justify-content: center; }
.rv-sched-embed { grid-template-columns: 1fr; }
#ghl-cal { max-width: 420px; margin: 0 auto; }
#ghl-cal.cal-wide { max-width: none; }

/* combined date + time picker (reuses the .rv-cal / .rv-slots pair the
   original two-up mock was built for) */
.cal-picker-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 560px) { .cal-picker-grid { grid-template-columns: 1fr; } }
.rv-slots-placeholder { color: var(--text-dim, #6b5b80); font-size: 15px; margin: 0; }
.cal-step-title { text-align: center; }
.rv-slots-label { text-align: center; }
.slot-list { justify-content: center; }
.cal-form { max-width: 360px; margin: 0 auto; text-align: left; }
.cal-step-head { text-align: left; }

/* enhancement: blocked/past dates + today marker (ONX-3) */
.day.blocked { opacity: .32; cursor: not-allowed; }
.day.today { position: relative; font-weight: 700; }
.day.today::after { content: ''; position: absolute; left: 50%; bottom: 3px; width: 4px; height: 4px; border-radius: 50%; background: var(--violet, #7c3aed); transform: translateX(-50%); }
.cal-done .btn { margin-top: 10px; display: inline-flex; }

/* enhancement: larger touch targets on small screens (ONX-3) */
@media (max-width: 480px) {
  .rv-cal-grid > span { min-height: 32px; display: flex; align-items: center; justify-content: center; }
  .rv-slot { padding: 12px 16px; font-size: 15px; }
  .cal-nav { width: 34px; height: 34px; font-size: 16px; }
  .cal-form { max-width: 100%; }
}

/* --- Responsive calendar embed: narrow viewports (ONX-4) --- */
@media (max-width: 600px) {
  /* reduce sched-embed side padding so #ghl-cal has more room */
  .rv-sched-embed { padding: 16px 14px; }
  /* reduce rv-cal internal padding */
  .rv-cal { padding: 12px 10px; }
  /* ensure the live calendar never exceeds its container */
  .rv-cal-live,
  #ghl-cal { max-width: 100%; width: 100%; }
  /* calendar grid: use auto-filling columns so 7 days always fit */
  .rv-cal-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
  /* cell touch targets: use aspect-ratio to stay square, no fixed size */
  .rv-cal-grid > span { min-height: unset; aspect-ratio: 1; }
  /* nav buttons can be a little smaller */
  .cal-nav { width: 30px; height: 30px; font-size: 16px; border-radius: 7px; }
  /* month label text */
  .rv-cal-month { font-size: 15px; }
  /* sched-head: tighten padding */
  .rv-sched-head { padding: 16px 18px; }
  /* foot */
  .rv-sched-foot { padding: 12px 14px 16px; }
}
