/* ============================================================
   Booking/assets/book.css — book.briggsfam.us
   Bold & modern, deliberately different from the dark family hub.
   ============================================================ */

:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --ink: #0f1222;
  --ink-2: #434a60;
  --muted: #7b8197;
  --line: #e7e9f2;
  --brand: #4f46e5;
  --brand-2: #7c3aed;
  --brand-ink: #ffffff;
  --brand-wash: #eef0fe;
  --ok: #16a34a;
  --danger: #e11d48;
  --shadow: 0 10px 30px -12px rgba(23, 23, 64, .25);
  --shadow-sm: 0 2px 10px -4px rgba(23, 23, 64, .22);
  --r: 18px;
  --r-sm: 12px;
  --maxw: 760px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}
h1, h2, h3, .brand, .host-name, .hero, .cal-title, .dur-btn { font-family: 'Space Grotesk', 'Inter', sans-serif; }
a { color: var(--brand); text-decoration: none; }

/* floating gradient orbs */
.bg-orbs { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-orbs span {
  position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5;
}
.bg-orbs span:nth-child(1) { width: 440px; height: 440px; top: -140px; right: -100px;
  background: radial-gradient(circle at 30% 30%, #a5b4fc, transparent 70%); }
.bg-orbs span:nth-child(2) { width: 380px; height: 380px; bottom: -160px; left: -120px;
  background: radial-gradient(circle at 60% 40%, #ddd6fe, transparent 70%); }

/* ---------- top bar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 16px clamp(16px, 4vw, 36px);
  max-width: 1120px; margin: 0 auto;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 600; color: var(--ink); }
.brand b { color: var(--brand); font-weight: 700; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: var(--shadow-sm);
}
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.who { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; color: var(--ink-2); }

/* ---------- layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 8px clamp(16px, 4vw, 24px) 60px; }
.wrap.wide { max-width: 1040px; }
.site-foot { text-align: center; color: var(--muted); font-size: 12px; padding: 24px 0 40px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; cursor: pointer; border: 1px solid transparent;
  padding: 11px 18px; border-radius: 999px; transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn.sm { padding: 7px 13px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { box-shadow: 0 10px 22px -8px rgba(79, 70, 229, .6); }
.btn-primary:disabled { opacity: .6; cursor: default; }
.btn-ghost { background: transparent; color: var(--ink-2); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface); color: var(--ink); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #22263c; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-ghost.danger, .btn.danger { color: var(--danger); border-color: #f3c6d1; }
.btn-ghost.danger:hover { background: #fff1f4; }
.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; font-size: 18px;
}
.icon-btn:hover { color: var(--ink); border-color: #cfd3e6; }
.icon-btn:disabled { opacity: .35; cursor: default; }
.link { color: var(--brand); font-weight: 600; }
.link:hover { text-decoration: underline; }

/* ---------- text ---------- */
.muted { color: var(--muted); }
.sm { font-size: 13px; }
h1 { font-size: clamp(26px, 4vw, 34px); margin: 0 0 6px; letter-spacing: -.02em; }
h2 { font-size: 18px; margin: 0 0 14px; letter-spacing: -.01em; }

/* ---------- cards & forms ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 22px clamp(18px, 3vw, 26px); box-shadow: var(--shadow-sm); margin-bottom: 18px;
}
.card.narrow { max-width: 460px; margin: 40px auto; }
.card.center { text-align: center; }
.stack { display: block; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field input, .field select, .field textarea {
  font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 11px 13px; width: 100%; transition: border .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-wash);
}
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.switch { display: flex; align-items: center; gap: 10px; font-weight: 500; color: var(--ink-2); cursor: pointer; margin-top: 6px; }
.switch input { width: 18px; height: 18px; accent-color: var(--brand); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span { display: inline-block; padding: 8px 15px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.chip input:checked + span { background: var(--brand-wash); border-color: var(--brand); color: var(--brand); }
.alert { background: #fff1f4; border: 1px solid #f3c6d1; color: #b4123f; padding: 10px 14px; border-radius: var(--r-sm); margin-bottom: 14px; font-size: 14px; }
.form-error { background: #fff1f4; border: 1px solid #f3c6d1; color: #b4123f; padding: 10px 14px; border-radius: var(--r-sm); margin-top: 12px; font-size: 14px; }
.empty { color: var(--muted); padding: 14px 0; }
.toast { background: #e7f8ee; border: 1px solid #b7e8c9; color: #0f7a3d; padding: 10px 14px; border-radius: var(--r-sm); margin-bottom: 16px; font-weight: 600; width: fit-content; }

/* ---------- auth ---------- */
.auth-card {
  max-width: 400px; margin: 7vh auto 0; background: var(--surface); border: 1px solid var(--line);
  border-radius: 22px; padding: 34px 30px; box-shadow: var(--shadow); text-align: center;
}
.auth-mark { width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center; margin: 0 auto 16px;
  color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2)); box-shadow: var(--shadow-sm); }
.auth-card form { text-align: left; margin-top: 18px; }
.auth-card .btn-block { margin-top: 6px; }
.auth-card .muted.sm { margin-top: 18px; }

/* ---------- avatars ---------- */
.avatar {
  display: inline-grid; place-items: center; border-radius: 50%; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); font-family: 'Space Grotesk', sans-serif;
}
.avatar.sm { width: 28px; height: 28px; font-size: 12px; }
.avatar.lg { width: 64px; height: 64px; font-size: 24px; box-shadow: var(--shadow-sm); }

/* ---------- dashboard head ---------- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin: 10px 0 20px; }
.status-pill { font-size: 13px; font-weight: 700; padding: 7px 14px; border-radius: 999px; white-space: nowrap; }
.status-pill.on { background: #e7f8ee; color: #0f7a3d; }
.status-pill.off { background: #f1f2f7; color: var(--muted); }
.save-bar { position: sticky; bottom: 0; padding: 14px 0; display: flex; justify-content: flex-end; }
.save-bar .btn { box-shadow: var(--shadow); }

/* ---------- hours editor ---------- */
.hours { display: flex; flex-direction: column; gap: 10px; }
.day-row { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px 16px; background: #fcfcff; }
.day-row.is-off { opacity: .55; }
.day-row.is-off .day-body { display: none; }
.day-toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.day-toggle input { width: 18px; height: 18px; accent-color: var(--brand); }
.day-name { font-weight: 700; font-family: 'Space Grotesk', sans-serif; }
.day-body { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 12px; }
.win-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 8px; }
.win-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.win-row { display: flex; align-items: center; gap: 8px; }
.win-row input[type=time] { border: 1px solid var(--line); border-radius: 10px; padding: 7px 9px; font: inherit; }
.win-row span { color: var(--muted); font-size: 13px; }

/* ---------- connected accounts ---------- */
.account { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px 16px; margin-bottom: 12px; background: #fcfcff; }
.account-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.account-head strong { font-size: 15px; }
.account-head .btn { margin-left: auto; }
.badge { font-size: 11px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; padding: 4px 9px; border-radius: 7px; }
.badge.g { background: #e8f0fe; color: #1a73e8; }
.badge.m { background: #e5f1fb; color: #0a66c2; }
.tag { font-size: 12px; font-weight: 700; background: var(--brand-wash); color: var(--brand); padding: 4px 10px; border-radius: 999px; }
.account-cals { margin-top: 12px; }
.connect-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.cal-pick { border-top: 1px dashed var(--line); padding-top: 12px; }
.cp-head { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 8px; }
.cp-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 14px; }
.cp-row > input { accent-color: var(--brand); width: 17px; height: 17px; }
.cp-row em { color: var(--muted); font-style: normal; font-size: 12px; }
.cp-write { margin-left: auto; font-size: 12px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 5px; }
.cp-write.disabled { opacity: .4; }
.cp-actions { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.cp-saved { color: var(--ok); font-weight: 600; font-size: 13px; }

/* ---------- bookings list ---------- */
.booking-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.booking-item { display: flex; align-items: center; gap: 16px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px 16px; background: #fcfcff; }
.bi-when { min-width: 120px; }
.bi-date { display: block; font-weight: 700; font-family: 'Space Grotesk', sans-serif; }
.bi-time { font-size: 13px; color: var(--muted); }
.bi-who { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.bi-who strong { font-size: 15px; }
.bi-reason { font-size: 13px; color: var(--ink-2); }
.booking-item .btn { margin-left: auto; }

/* ---------- directory ---------- */
.hero { text-align: center; padding: 36px 0 26px; }
.hero h1 { font-size: clamp(30px, 6vw, 48px); line-height: 1.05; }
.grad { background: linear-gradient(120deg, var(--brand), var(--brand-2) 60%, #db2777); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { color: var(--ink-2); font-size: 17px; max-width: 440px; margin: 10px auto 0; }
.host-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.host-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 24px 20px;
  text-align: center; box-shadow: var(--shadow-sm); transition: transform .15s ease, box-shadow .2s ease, border-color .2s;
  color: var(--ink); display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.host-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #d6d9ec; }
.host-card .avatar { margin-bottom: 6px; }
.hc-name { font-weight: 700; font-size: 18px; font-family: 'Space Grotesk', sans-serif; }
.hc-tag { color: var(--ink-2); font-size: 14px; }
.hc-meta { color: var(--muted); font-size: 13px; }
.hc-go { margin-top: 10px; color: var(--brand); font-weight: 700; font-size: 14px; }
.foot-signin { text-align: center; margin-top: 28px; }

/* ---------- booking page ---------- */
.booking { display: grid; grid-template-columns: 300px 1fr; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; margin-top: 10px; }
.booking-side { padding: 30px 26px; border-right: 1px solid var(--line); background: linear-gradient(180deg, #fbfbff, #f4f5fd); }
.host-name { font-size: 24px; margin: 14px 0 4px; }
.host-tagline { color: var(--ink-2); margin: 0 0 18px; }
.meta { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.meta li { display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: 14px; font-weight: 500; }
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--brand); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.host-notes { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 14px; }

.booking-main { padding: 26px clamp(18px, 3vw, 30px); min-width: 0; }
.dur-pick { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.dur-label { font-size: 13px; font-weight: 700; color: var(--muted); margin-right: 4px; }
.dur-btn { font: inherit; font-weight: 600; padding: 8px 15px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); cursor: pointer; }
.dur-btn.active { background: var(--brand-wash); border-color: var(--brand); color: var(--brand); }

.picker { display: grid; grid-template-columns: 1fr 230px; gap: 22px; }
.cal { position: relative; }
.cal-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cal-title { font-size: 17px; font-weight: 700; }
.cal-dow { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; color: var(--muted); font-size: 12px; font-weight: 700; margin-bottom: 6px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-day { aspect-ratio: 1; border: 0; background: transparent; border-radius: 12px; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; position: relative; }
.cal-day.disabled { color: #c3c7d8; cursor: default; }
.cal-day.open { background: var(--brand-wash); color: var(--brand); }
.cal-day.open:hover { background: #e0e2fd; }
.cal-day.selected { background: var(--brand); color: #fff; }
.cal-day.today::after { content: ''; position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.cal-loading { position: absolute; inset: 44px 0 0; display: grid; place-items: center; background: rgba(255,255,255,.7); color: var(--muted); font-size: 14px; border-radius: 12px; }

.slots { min-width: 0; }
.slots-title { font-weight: 700; margin-bottom: 12px; }
.slots-list { display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow-y: auto; padding-right: 4px; }
.slot { font: inherit; font-weight: 600; padding: 12px; border-radius: 12px; border: 1px solid var(--brand); color: var(--brand); background: #fff; cursor: pointer; transition: transform .1s, background .15s; }
.slot:hover { background: var(--brand-wash); transform: translateY(-1px); }

.book-form { margin-top: 10px; max-width: 520px; }
.chosen { display: flex; flex-direction: column; gap: 2px; background: var(--brand-wash); border: 1px solid #d9dcfb; border-radius: var(--r-sm); padding: 14px 16px; margin-bottom: 18px; }
.chosen strong { font-family: 'Space Grotesk', sans-serif; }
.chosen span { color: var(--brand); font-weight: 600; font-size: 14px; }
.form-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; }

.confirmation { text-align: center; padding: 30px 10px; }
.confirmation .check { width: 64px; height: 64px; border-radius: 50%; background: #e7f8ee; color: var(--ok); display: grid; place-items: center; font-size: 32px; margin: 0 auto 16px; }
.conf-when { font-size: 18px; font-weight: 700; font-family: 'Space Grotesk', sans-serif; margin: 0 0 4px; }
.when-big { font-size: 18px; font-weight: 700; font-family: 'Space Grotesk', sans-serif; margin: 10px 0 2px; }
.confirm-actions { display: flex; justify-content: center; gap: 12px; margin-top: 20px; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .booking { grid-template-columns: 1fr; }
  .booking-side { border-right: 0; border-bottom: 1px solid var(--line); }
  .picker { grid-template-columns: 1fr; }
  .slots-list { max-height: none; }
}
@media (max-width: 560px) {
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .day-body { grid-template-columns: 1fr; }
  .page-head { flex-direction: column; }
  .topbar-actions .btn-ghost:first-child { display: none; }
  .booking-item { flex-wrap: wrap; }
}
