*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
:root{
  --bg:#f3f4f6;
  --card:#fff;
  --surface:#f9fafb;
  --border:#e5e7eb;
  --text:#111827;
  --muted:#6b7280;
  --subtle:#9ca3af;
  --green:#22c55e;
  --green-ring:rgba(34,197,94,.25);
  --accent:#22c55e;
  --accent-ring:rgba(34,197,94,.25);
  --day-bg:#e5e7eb;
  --day-bg-hover:#d1d5db;
  --day-sel-bg:#111827;
  --day-sel-fg:#ffffff;
  --r:12px;
  color-scheme:light;
}
[data-theme=dark]{
  --bg:#0a0a0a;
  --card:#1c1c1c;
  --surface:#262626;
  --border:#2e2e2e;
  --text:#fafafa;
  --muted:#a1a1aa;
  --subtle:#52525b;
  --day-bg:#3a3a3a;
  --day-bg-hover:#4a4a4a;
  --day-sel-bg:#ffffff;
  --day-sel-fg:#111827;
  color-scheme:dark;
}
body{font-family:'Plus Jakarta Sans',system-ui,sans-serif;background:var(--bg);color:var(--text);min-height:100vh;font-size:14px;line-height:1.5;-webkit-font-smoothing:antialiased}

/* theme toggle */
.theme-toggle{position:fixed;top:16px;right:16px;z-index:100;background:var(--card);border:1px solid var(--border);border-radius:8px;padding:7px 11px;cursor:pointer;color:var(--muted);font-size:15px;display:flex;align-items:center;transition:color .15s}
.theme-toggle:hover{color:var(--text)}
body[data-embed=true] .theme-toggle{display:none}
/* Embed mode: clean light design with subtle grey background so the card
   reads clearly on any host page. Always light-mode regardless of user prefs. */
body[data-embed=true]{
  --bg:transparent;--card:#ffffff;--surface:#f3f4f6;--border:#d1d5db;
  --text:#111827;--muted:#6b7280;--subtle:#9ca3af;
  background:transparent!important;color-scheme:light}
body[data-embed=true] .page{background:transparent!important;padding:0;align-items:stretch}
body[data-embed=true] .bk-card{background:#ffffff!important;border:1px solid #e5e7eb!important;box-shadow:0 1px 4px rgba(0,0,0,.07),0 4px 16px rgba(0,0,0,.05)!important;border-radius:12px!important;overflow:visible!important}
@media(max-width:720px){
  body[data-embed=true] .page{padding:0!important}
  body[data-embed=true] .bk-card{border:none!important;box-shadow:none!important;border-radius:0!important;max-width:100%!important;width:100%!important}
}
body[data-embed=true] .bk-side{background:#fafafa!important}
/* ?embed=mobile — mobile-only overrides (desktop untouched). At iframe
   widths >720px this does nothing; the regular desktop layout applies. At
   ≤720px the existing media-query rules already stack the card — these
   extras just strip the iframe chrome so the card fills the parent. */
@media(max-width:720px){
  html[data-embed-layout=mobile],body[data-embed=true][data-embed-layout=mobile]{margin:0!important;padding:0!important;background:transparent!important}
  body[data-embed=true][data-embed-layout=mobile] .page{padding:0!important;margin:0!important;align-items:stretch;justify-content:stretch;min-height:auto;width:100%}
  body[data-embed=true][data-embed-layout=mobile] .bk-card{max-width:none!important;width:100%!important;min-height:auto;border:none!important;border-radius:0!important;box-shadow:none!important;overflow:visible!important;margin:0!important}
  body[data-embed=true][data-embed-layout=mobile] .bk-side{padding-top:14px!important}
}
/* Confirm button: use brand accent in embed light mode for clear contrast */
body[data-embed=true] .btn-confirm{background:var(--accent)!important;color:#fff!important}
body[data-embed=true] .btn-confirm:hover{opacity:.88!important}
/* Timezone popover: always use fixed positioning via JS so it escapes the
   card's overflow:hidden (was previously embed-only, which caused the list
   to be clipped on the normal booking page as well). */

/* page shell */
.page{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px 16px}
body[data-embed=true] .page{padding:0;align-items:flex-start;min-height:auto}

/* booking card */
.bk-card{background:var(--card);border:1px solid var(--border);border-radius:var(--r);overflow:hidden;display:flex;width:100%;max-width:1080px;min-height:560px}
@media(max-width:720px){.bk-card{flex-direction:column;max-width:480px}}

/* ── sidebar ─────────────────────────────────────────── */
.bk-side{width:280px;flex-shrink:0;padding:28px 24px;border-right:1px solid var(--border);display:flex;flex-direction:column;gap:20px}
@media(max-width:720px){.bk-side{width:100%;border-right:none;border-bottom:1px solid var(--border);padding:20px}}

.side-avatar{width:40px;height:40px;border-radius:50%;background:var(--surface);border:1px solid var(--border);display:flex;align-items:center;justify-content:center;font-size:16px;font-weight:700;color:var(--text);overflow:hidden;flex-shrink:0}
.side-avatar img{width:100%;height:100%;object-fit:cover}
.side-host{font-size:13px;font-weight:500;color:var(--muted);margin-bottom:6px}
.side-title{font-size:22px;font-weight:800;line-height:1.2;color:var(--text);letter-spacing:-.015em}
.side-desc{font-size:13px;color:var(--text);line-height:1.5}

.side-meta{display:flex;flex-direction:column;gap:10px}
.meta-row{display:flex;align-items:center;gap:10px;font-size:13px;color:var(--muted)}
.meta-icon{width:18px;height:18px;flex-shrink:0;display:flex;align-items:center;justify-content:center;opacity:.7}

/* selected slot summary in sidebar (shown when form is active) */
.side-slot{display:none;background:var(--surface);border:1px solid var(--border);border-radius:8px;padding:12px;gap:10px;align-items:flex-start}
.side-slot.visible{display:flex}
.side-slot-info{display:flex;flex-direction:column;gap:1px}
.side-slot-date{font-size:13px;font-weight:600;color:var(--text)}
.side-slot-time{font-size:13px;color:var(--muted)}

/* tz selector */
.tz-btn{background:transparent;border:none;cursor:pointer;color:var(--muted);font-size:13px;font-family:inherit;display:flex;align-items:center;gap:4px;padding:0;text-align:left}
.tz-btn:hover{color:var(--text)}
/* tz popover */
.tz-wrap{position:relative;display:inline-block}
.tz-popover{position:fixed;top:0;left:0;width:280px;max-height:min(360px,80vh);background:var(--card);border:1px solid var(--border);border-radius:10px;box-shadow:0 10px 30px rgba(0,0,0,.18),0 2px 8px rgba(0,0,0,.06);z-index:9999;padding:10px;display:none;flex-direction:column}
.tz-popover.open{display:flex}
.tz-search{width:100%;padding:8px 10px;background:var(--surface);border:1px solid var(--border);border-radius:7px;color:var(--text);font-family:inherit;font-size:13px;outline:none;margin-bottom:8px}
.tz-search:focus{border-color:var(--accent)}
.tz-list{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:1px}
.tz-list::-webkit-scrollbar{width:4px}
.tz-list::-webkit-scrollbar-thumb{background:var(--border);border-radius:2px}
.tz-item{padding:8px 10px;border-radius:6px;cursor:pointer;color:var(--text);font-size:13px;background:transparent;border:none;text-align:left;font-family:inherit;width:100%}
.tz-item:hover,.tz-item.active{background:var(--surface)}
.tz-item .tz-offset{color:var(--muted);font-size:11px;margin-left:6px}
.tz-caret{font-size:10px;opacity:.6}

/* ── calendar panel ──────────────────────────────────── */
.bk-cal{flex:1;padding:24px 14px;border-right:1px solid var(--border);min-width:0}
@media(max-width:720px){.bk-cal{border-right:none;border-bottom:1px solid var(--border);padding:20px}}

.cal-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:22px}
.cal-month-label{font-size:18px;font-weight:700;letter-spacing:-.01em}
.cal-month-label span{color:var(--muted);font-weight:500;margin-left:4px}
.cal-nav{display:flex;gap:6px}
.cal-nav-btn{width:30px;height:30px;border-radius:8px;background:transparent;border:none;cursor:pointer;color:var(--muted);font-size:18px;display:flex;align-items:center;justify-content:center;transition:background .15s,color .15s}
.cal-nav-btn:hover{background:var(--surface);color:var(--text)}
.cal-nav-btn:disabled{opacity:.3;cursor:default}
.cal-nav-btn:disabled:hover{background:transparent}

.cal-weekdays{display:grid;grid-template-columns:repeat(7,1fr);text-align:center;margin-bottom:10px}
.cal-weekdays span{font-size:11px;font-weight:600;color:var(--subtle);letter-spacing:.08em;padding:6px 0;text-transform:uppercase}

.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:6px}
/* Square cells via aspect-ratio — each cell fills its column width and is
   exactly as tall as it is wide, keeping a clean tiled grid. */
.cal-cell{aspect-ratio:1/1;display:flex;align-items:center;justify-content:center;position:relative}
.cal-day{width:100%;height:100%;border-radius:6px;border:none;outline:none;background:transparent;cursor:pointer;color:var(--text);font-size:13px;font-weight:600;line-height:1;position:relative;transition:background .12s,color .12s;display:flex;align-items:center;justify-content:center;padding:0;-webkit-tap-highlight-color:transparent}
.cal-day:focus-visible{box-shadow:0 0 0 2px var(--accent-ring)}
.cal-day:disabled{color:var(--subtle);cursor:default;opacity:.45;font-weight:500}
/* Available days: solid filled tile (not coloured tint) — matches the
   reference where every bookable date is a flat grey rounded square. */
.cal-day.available:not(:disabled){background:var(--day-bg);color:var(--text);font-weight:600}
.cal-day.available:not(:disabled):hover{background:var(--day-bg-hover)}
/* Today: small accent dot below the number, no ring — matches reference */
.cal-day.today:not(.selected)::after{content:'';position:absolute;bottom:6px;left:50%;transform:translateX(-50%);width:3px;height:3px;border-radius:50%;background:var(--accent)}
/* Selected: solid invert fill, no border. Bold number on contrasting bg. */
.cal-day.selected{background:var(--day-sel-bg)!important;color:var(--day-sel-fg)!important;font-weight:700;box-shadow:none}
.cal-day.selected::after{display:none}

/* ── times panel ─────────────────────────────────────── */
.bk-times{width:300px;flex-shrink:0;padding:28px 22px;display:flex;flex-direction:column;height:560px}
@media(max-width:720px){.bk-times{width:100%;padding:20px;min-height:auto}}

.times-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px;flex-shrink:0}
.times-day-label{font-size:16px;font-weight:700;letter-spacing:-.01em}
.times-day-label span{color:var(--muted);font-weight:500}
.fmt-toggle{display:flex;border:1px solid var(--border);border-radius:8px;overflow:hidden;flex-shrink:0}
.fmt-btn{padding:5px 12px;background:transparent;border:none;cursor:pointer;color:var(--muted);font-size:12px;font-weight:600;transition:background .12s,color .12s}
.fmt-btn.active{background:var(--surface);color:var(--text)}

.times-list{flex:1;overflow-y:auto;display:flex;flex-direction:column;gap:8px;padding-right:6px;min-height:0}
.times-list::-webkit-scrollbar{width:4px}
.times-list::-webkit-scrollbar-track{background:transparent}
.times-list::-webkit-scrollbar-thumb{background:var(--border);border-radius:2px}

.slot-btn{width:100%;padding:13px 16px;background:var(--surface);border:1px solid var(--border);border-radius:10px;cursor:pointer;color:var(--text);font-size:14px;font-weight:600;display:flex;align-items:center;justify-content:center;gap:10px;transition:border-color .12s,background .12s;text-align:center}
.slot-btn:hover{border-color:var(--accent);background:var(--card)}
.slot-dot{width:8px;height:8px;border-radius:50%;background:#22c55e;flex-shrink:0}
.no-slots{color:var(--muted);font-size:13px;padding:20px 0;text-align:center}
.loading-slots{color:var(--muted);font-size:13px;padding:20px 0;text-align:center}

/* ── booking form panel ──────────────────────────────── */
.bk-form{flex:1;padding:28px 24px;min-width:0}
@media(max-width:720px){.bk-form{padding:20px}}

.form-title{font-size:16px;font-weight:700;margin-bottom:20px}
.field{display:flex;flex-direction:column;gap:5px;margin-bottom:14px}
.field label{font-size:13px;font-weight:500;color:var(--text)}
.field input,.field textarea{padding:12px 14px;background:var(--surface);border:1px solid var(--border);border-radius:8px;color:var(--text);font-family:inherit;font-size:14px;transition:border-color .12s,box-shadow .12s;outline:none;width:100%}
.field input:focus,.field textarea:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-ring)}
.field input::placeholder,.field textarea::placeholder{color:var(--text);opacity:.72;font-weight:500}
.field input:focus::placeholder,.field textarea:focus::placeholder{opacity:.4}
.field textarea{min-height:80px;resize:vertical;line-height:1.5}
.field-opt{color:var(--muted);font-weight:400}

.add-guests-btn{background:transparent;border:none;cursor:pointer;color:var(--muted);font-size:13px;font-family:inherit;display:flex;align-items:center;gap:6px;padding:0;margin-bottom:14px}
.add-guests-btn:hover{color:var(--text)}
.guests-list{display:flex;flex-direction:column;gap:6px;margin-bottom:10px}
.guest-tag{display:flex;align-items:center;justify-content:space-between;background:var(--surface);border:1px solid var(--border);border-radius:6px;padding:6px 10px;font-size:13px}
.guest-remove{background:transparent;border:none;cursor:pointer;color:var(--muted);font-size:16px;line-height:1;padding:0}

.guest-input-row{display:flex;gap:6px}
.guest-input-row input{flex:1;padding:8px 10px;background:var(--surface);border:1px solid var(--border);border-radius:8px;color:var(--text);font-family:inherit;font-size:13px;outline:none}
.guest-input-row input:focus{border-color:var(--accent)}
.guest-add-btn{padding:8px 14px;background:var(--surface);border:1px solid var(--border);border-radius:8px;cursor:pointer;color:var(--text);font-size:13px;font-weight:500;white-space:nowrap}

.form-disclaimer{font-size:12px;color:var(--muted);margin-top:4px;margin-bottom:16px;line-height:1.5}
.form-err{font-size:13px;color:#ef4444;margin-bottom:12px}

.form-footer{display:flex;align-items:center;gap:12px;margin-top:4px}
.btn-back{background:transparent;border:none;cursor:pointer;color:var(--muted);font-size:14px;font-weight:500;font-family:inherit;padding:0}
.btn-back:hover{color:var(--text)}
.btn-confirm{padding:10px 24px;background:var(--text);color:var(--card);border:none;border-radius:8px;cursor:pointer;font-size:14px;font-weight:600;font-family:inherit;transition:opacity .12s}
.btn-confirm:hover{opacity:.85}
.btn-confirm:disabled{opacity:.5;cursor:not-allowed}

/* ── success screen ──────────────────────────────────── */
.bk-success{width:100%;padding:48px 32px;display:flex;flex-direction:column;align-items:center;text-align:center}
@media(max-width:520px){.bk-success{padding:32px 20px}}
@media(max-width:720px){
  .page{padding:0;align-items:flex-start}
  .bk-card{min-height:auto;border-radius:0;border:none;max-width:100%}
  .bk-side{padding:18px 18px 14px;gap:14px}
  .side-title{font-size:18px}
  .bk-cal{padding:16px 14px}
  .bk-times{height:auto;max-height:none;padding:18px 14px}
  .times-list{max-height:400px}
  .cal-day{font-size:12px}
  .cal-grid{gap:5px}
  .bk-form{padding:18px}
  .bk-success{padding:32px 18px}
  .success-grid{grid-template-columns:1fr;gap:6px 0}
  .sg-label{padding-top:8px}
  .theme-toggle{top:10px;right:10px}
}
@media(max-width:420px){
  .cal-day{font-size:11px}
  .cal-grid{gap:4px}
}

.success-icon{width:56px;height:56px;border-radius:50%;background:var(--accent);display:flex;align-items:center;justify-content:center;margin:0 auto 20px}
.success-icon svg{width:24px;height:24px;stroke:#fff;stroke-width:3;fill:none}
.success-title{font-size:22px;font-weight:700;margin-bottom:8px}
.success-sub{font-size:14px;color:var(--muted);margin-bottom:28px;max-width:380px}

.success-divider{width:100%;border:none;border-top:1px solid var(--border);margin:0 0 24px}

.success-grid{width:100%;max-width:520px;display:grid;grid-template-columns:70px 1fr;gap:14px 24px;text-align:left;margin-bottom:24px;align-items:start}
.sg-label{font-size:13px;font-weight:600;color:var(--muted);padding-top:2px;line-height:1.5}
.sg-value{font-size:14px;color:var(--text);line-height:1.5;align-self:start}
.sg-who-row{display:flex;flex-direction:column;gap:8px}
.sg-person{display:flex;flex-direction:column;gap:1px}
.sg-person-name{display:flex;align-items:center;gap:6px;font-weight:600}
.sg-person-email{font-size:13px;color:var(--muted)}
.host-badge{font-size:11px;font-weight:600;background:#3b82f6;color:#fff;padding:1px 7px;border-radius:12px;letter-spacing:.02em}
.meet-link{display:inline-flex;align-items:center;gap:5px;color:var(--text);font-weight:500}
.meet-link svg{width:13px;height:13px;stroke:currentColor;stroke-width:2;fill:none;flex-shrink:0;opacity:.7}

.success-change{font-size:13px;color:var(--muted);margin-bottom:24px}
.success-change a{color:var(--muted);font-weight:500}
.success-change a:hover{color:var(--text)}

.cal-icons{display:flex;align-items:center;gap:12px;flex-wrap:wrap;justify-content:center}
.cal-icon-label{font-size:13px;color:var(--muted);margin-right:4px}
.cal-icon-btn{width:36px;height:36px;border-radius:8px;background:var(--surface);border:1px solid var(--border);cursor:pointer;display:flex;align-items:center;justify-content:center;text-decoration:none;color:var(--text);font-size:15px;transition:background .12s}
.cal-icon-btn:hover{background:var(--border)}

.hidden{display:none!important}
/* Phone country-code picker */
.phone-row{display:flex;gap:6px;align-items:stretch}
.phone-country{display:flex;align-items:center;gap:6px;padding:0 10px;background:var(--surface);border:1px solid var(--border);border-radius:8px;color:var(--text);font-family:inherit;font-size:14px;cursor:pointer;white-space:nowrap;min-width:88px;transition:border-color .12s,background .12s}
.phone-country:hover{border-color:var(--accent,#10b981)}
.phone-country[aria-expanded="true"]{border-color:var(--accent,#10b981)}
.phone-country-flag{font-size:16px;line-height:1}
.phone-country-code{font-weight:500}
.phone-country-caret{width:10px;height:10px;opacity:.6}
.phone-row>#f-phone{flex:1;min-width:0}
.phone-dropdown{position:relative;margin-top:6px;background:var(--surface);border:1px solid var(--border);border-radius:8px;overflow:hidden;z-index:10}
.phone-dropdown[hidden]{display:none}
.phone-search{width:100%;padding:10px 12px;border:0;border-bottom:1px solid var(--border);background:transparent;color:var(--text);font-family:inherit;font-size:14px;outline:none;box-sizing:border-box}
.phone-list{max-height:240px;overflow-y:auto}
.phone-list-item{display:flex;align-items:center;gap:10px;padding:8px 12px;cursor:pointer;font-size:14px;color:var(--text)}
.phone-list-item:hover,.phone-list-item.active{background:var(--border)}
.phone-list-item .pl-flag{font-size:16px;line-height:1}
.phone-list-item .pl-name{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.phone-list-item .pl-code{color:var(--muted);font-variant-numeric:tabular-nums}
.phone-list-empty{padding:14px 12px;color:var(--muted);font-size:13px;text-align:center}
