/* Booking widget — modern 2-pane scheduler. Brand teal accent, mobile-first.
   Used by book.html + js/components/booking.js. */

#booking {
  --bk-accent: #22D3A6;
  --bk-accent-dark: #0EA5E9;
  --bk-ink: #1F2937;
  --bk-muted: #6b7280;
  --bk-line: #e5e7eb;
  --bk-bg: #ffffff;
  --bk-soft: #f9fafb;
  color: var(--bk-ink);
  font-family: 'DM Sans', system-ui, sans-serif;
}

/* ---- card / panes ---- */
.bk-card {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 0;
  border: 1px solid var(--bk-line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--bk-bg);
  box-shadow: 0 8px 30px rgba(16, 24, 40, 0.06);
}
.bk-rail {
  padding: 1.5rem;
  border-right: 1px solid var(--bk-line);
  background: var(--bk-soft);
}
.bk-pane {
  padding: 1.5rem;
  min-height: 360px;
}

/* ---- meeting summary ---- */
.bk-meta-title { font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 1.15rem; margin: 0 0 .75rem; }
.bk-meta-row { display: flex; align-items: center; gap: .5rem; color: var(--bk-muted); font-size: .9rem; margin: .35rem 0; }
.bk-meta-row i { color: var(--bk-accent); width: 1.1em; text-align: center; }

/* ---- calendar ---- */
.bk-cal-head { display: flex; align-items: center; justify-content: space-between; margin: 1.25rem 0 .5rem; }
.bk-cal-month { font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 1rem; }
.bk-nav { background: none; border: 1px solid var(--bk-line); border-radius: 8px; width: 32px; height: 32px; cursor: pointer; color: var(--bk-ink); font-size: 1rem; line-height: 1; }
.bk-nav:disabled { opacity: .35; cursor: default; }
.bk-nav:not(:disabled):hover { border-color: var(--bk-accent); color: var(--bk-accent); }
.bk-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.bk-dow { text-align: center; font-size: .7rem; color: var(--bk-muted); font-weight: 600; padding: .3rem 0; }
.bk-day {
  position: relative; aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  border: none; background: none; border-radius: 50%; font-size: .85rem; color: #c7c9cf; cursor: default;
}
.bk-day.is-available { color: var(--bk-ink); font-weight: 600; cursor: pointer; background: rgba(34,211,166,.10); }
.bk-day.is-available:hover { background: rgba(34,211,166,.22); }
.bk-day.is-available::after { content: ""; position: absolute; bottom: 5px; width: 4px; height: 4px; border-radius: 50%; background: var(--bk-accent); }
.bk-day.is-selected { background: var(--bk-accent); color: #04201a; }
.bk-day.is-selected::after { background: #04201a; }
.bk-day:focus-visible { outline: 2px solid var(--bk-accent-dark); outline-offset: 1px; }

/* ---- slots ---- */
.bk-pane-title { font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 1.05rem; margin: 0 0 .25rem; }
.bk-pane-sub { color: var(--bk-muted); font-size: .85rem; margin: 0 0 1rem; }
.bk-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .5rem; max-height: 360px; overflow-y: auto; }
.bk-slot { padding: .65rem; border: 1px solid var(--bk-line); border-radius: 10px; background: #fff; cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--bk-ink); transition: border-color .12s, background .12s; }
.bk-slot:hover { border-color: var(--bk-accent); }
.bk-slot.is-selected { background: var(--bk-accent); border-color: var(--bk-accent); color: #04201a; }
.bk-slot:focus-visible { outline: 2px solid var(--bk-accent-dark); outline-offset: 1px; }

/* ---- form ---- */
.bk-form { max-width: 460px; }
.bk-back { background: none; border: none; color: var(--bk-accent-dark); cursor: pointer; font-size: .9rem; padding: 0; margin-bottom: .75rem; }
.bk-when { font-weight: 700; margin: 0 0 1rem; }
.bk-field { width: 100%; padding: .7rem .85rem; border: 1px solid var(--bk-line); border-radius: 10px; font-size: 1rem; margin-bottom: .6rem; font-family: inherit; }
.bk-field:focus { outline: none; border-color: var(--bk-accent); box-shadow: 0 0 0 3px rgba(34,211,166,.15); }
.bk-honey { position: absolute; left: -9999px; }
.bk-btn { width: 100%; padding: .8rem; background: var(--bk-accent); color: #04201a; border: none; border-radius: 10px; font-weight: 700; font-size: 1rem; cursor: pointer; }
.bk-btn:hover { background: #1cc197; }
.bk-btn:disabled { opacity: .6; cursor: default; }
.bk-msg { min-height: 1.1em; font-size: .9rem; margin: .7rem 0 0; }
.bk-msg.err { color: #b91c1c; }
.bk-msg.ok { color: #15803d; }
.bk-msg.info { color: var(--bk-muted); }

/* ---- confirmation ---- */
.bk-confirm { text-align: center; padding: 2.5rem 1rem; }
.bk-confirm .bk-check { width: 56px; height: 56px; border-radius: 50%; background: rgba(34,211,166,.15); color: var(--bk-accent); display: inline-flex; align-items: center; justify-content: center; font-size: 1.6rem; margin-bottom: 1rem; }
.bk-confirm h2 { font-family: 'Outfit', sans-serif; margin: 0 0 .5rem; color: var(--bk-ink); }
.bk-confirm p { color: var(--bk-muted); margin: .35rem 0; }
.bk-confirm a { color: var(--bk-accent-dark); word-break: break-all; }

/* ---- skeleton / empty ---- */
.bk-skeleton { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px,1fr)); gap: .5rem; }
.bk-skeleton span { height: 44px; border-radius: 10px; background: linear-gradient(90deg,#f1f2f4,#e9ebee,#f1f2f4); background-size: 200% 100%; animation: bk-shimmer 1.2s infinite; }
@keyframes bk-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.bk-empty { color: var(--bk-muted); padding: 1rem 0; }

/* ---- responsive: stack under 820px ---- */
@media (max-width: 820px) {
  .bk-card { grid-template-columns: 1fr; }
  .bk-rail { border-right: none; border-bottom: 1px solid var(--bk-line); }
  .bk-slots { max-height: none; }
  /* sticky confirm during the form step */
  .bk-form.is-sticky .bk-btn { position: sticky; bottom: 12px; }
}
