/* Dealflow Booking: shared styles for the public booking app and the admin.
   Colors are tokens so embeds can override --accent via ?primary= and the theme via ?theme=. */
:root {
  --bg: #eef1ee; --card: #ffffff; --card-2: #f4f7f4; --fg: #16201b; --muted: #5e6b64; --line: #d6ddd8;
  --accent: #1f7a5c; --accent-fg: #ffffff; --accent-soft: color-mix(in srgb, var(--accent) 14%, var(--card));
  --danger: #b4443a; --ok: #1f7a5c;
  --font-display: "Sora", "Segoe UI", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --radius: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #111715; --card: #192120; --card-2: #1f2927; --fg: #e8ede9; --muted: #98a59e; --line: #2d3a35; --accent: #4fc39a; --accent-fg: #0d1a14; --danger: #e0756b; --ok: #4fc39a; color-scheme: dark; }
}
:root[data-theme="dark"] { --bg: #111715; --card: #192120; --card-2: #1f2927; --fg: #e8ede9; --muted: #98a59e; --line: #2d3a35; --accent: #4fc39a; --accent-fg: #0d1a14; --danger: #e0756b; --ok: #4fc39a; color-scheme: dark; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font-family: var(--font-body); font-size: 15px; line-height: 1.5; padding: 28px max(16px, env(safe-area-inset-right, 0px)) 48px max(16px, env(safe-area-inset-left, 0px)); }
body.embed { background: transparent; padding: 0; }
body.embed .topbar, body.embed .foot { display: none; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; text-wrap: balance; line-height: 1.2; }
h1 { font-size: 1.55rem; font-weight: 700; } h2 { font-size: 1.1rem; font-weight: 600; } h3 { font-size: 0.95rem; font-weight: 600; }
p { margin: 0; } a { color: var(--accent); }
button { font: inherit; cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 980px; margin: 0 auto; display: grid; gap: 18px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.brand { text-decoration: none; font-family: var(--font-display); font-weight: 600; color: var(--fg); }
.eyebrow { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.booking { display: grid; grid-template-columns: 300px 1fr; min-height: 520px; }
@media (max-width: 760px) { .booking { grid-template-columns: 1fr; } }
.pane-info { padding: 26px 24px; border-right: 1px solid var(--line); background: var(--card-2); display: grid; align-content: start; gap: 14px; min-width: 0; }
@media (max-width: 760px) { .pane-info { border-right: 0; border-bottom: 1px solid var(--line); } }
.pane-main { padding: 24px; min-width: 0; display: grid; align-content: start; gap: 18px; }
.host { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--accent-fg); display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; flex-shrink: 0; }
.meta { display: grid; gap: 8px; color: var(--muted); font-size: 0.9rem; }
.meta div { display: flex; gap: 8px; align-items: flex-start; min-width: 0; }
.meta span { overflow-wrap: anywhere; }
.meta svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; }
.desc { color: var(--muted); font-size: 0.92rem; max-width: 40ch; }
.steps { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 761px) { .steps.has-slots { grid-template-columns: 1fr 200px; } }
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.cal-head h2 { font-size: 1rem; }
.nav { display: flex; gap: 4px; }
.nav button { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--fg); display: grid; place-items: center; }
.nav button:hover:not(:disabled) { background: var(--accent-soft); }
.nav button:disabled { opacity: 0.35; cursor: default; }
.grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.dow { text-align: center; font-size: 0.7rem; letter-spacing: 0.06em; color: var(--muted); font-weight: 600; padding: 4px 0; }
.day { aspect-ratio: 1; max-width: 100%; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-family: var(--font-mono); font-size: 0.9rem; display: grid; place-items: center; position: relative; }
.day.avail { background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.day.avail:hover { outline: 2px solid var(--accent); outline-offset: -2px; }
.day.sel { background: var(--accent); color: var(--accent-fg); }
.day.today::after { content: ""; position: absolute; bottom: 5px; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.day:disabled { cursor: default; opacity: 0.55; }
.tz { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 0.85rem; color: var(--muted); flex-wrap: wrap; }
.tz select { font: inherit; font-size: 0.85rem; color: var(--fg); background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; max-width: 100%; }
.slots { display: grid; gap: 8px; align-content: start; }
.slot-list { display: grid; gap: 8px; max-height: 420px; overflow-y: auto; padding-right: 2px; }
.slot { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.slot-btn { border: 1px solid var(--accent); color: var(--accent); background: transparent; border-radius: var(--radius); padding: 10px; font-family: var(--font-mono); font-weight: 500; }
.slot-btn:hover { background: var(--accent-soft); }
.slot.armed .slot-btn { background: var(--muted); border-color: var(--muted); color: var(--card); }
.slot .confirm { display: none; border: 0; background: var(--accent); color: var(--accent-fg); border-radius: var(--radius); padding: 10px 14px; font-weight: 600; }
.slot.armed .confirm { display: block; }
.empty { color: var(--muted); font-size: 0.9rem; padding: 14px; border: 1px dashed var(--line); border-radius: var(--radius); }
form { display: grid; gap: 14px; } form.narrow { max-width: 460px; }
label { display: grid; gap: 6px; font-size: 0.88rem; font-weight: 500; }
input, textarea, select { font: inherit; color: var(--fg); background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; width: 100%; }
textarea { min-height: 84px; resize: vertical; }
.btn { border: 0; border-radius: 999px; padding: 11px 20px; font-weight: 600; background: var(--accent); color: var(--accent-fg); text-decoration: none; display: inline-block; }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.ghost { background: transparent; color: var(--fg); border: 1px solid var(--line); }
.btn.danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); }
.btn.sm { padding: 6px 12px; font-size: 0.85rem; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.back { background: transparent; border: 0; color: var(--accent); padding: 0; font-weight: 500; }
.summary { display: grid; gap: 6px; padding: 14px; background: var(--card-2); border-radius: var(--radius); font-size: 0.92rem; }
.summary strong { font-family: var(--font-mono); font-weight: 500; }
.notice { padding: 10px 14px; border-radius: var(--radius); font-size: 0.9rem; background: var(--accent-soft); color: var(--fg); }
.notice.err { background: color-mix(in srgb, var(--danger) 14%, transparent); }
.done { display: grid; gap: 14px; max-width: 480px; }
.check { width: 48px; height: 48px; border-radius: 50%; background: var(--accent-soft); color: var(--ok); display: grid; place-items: center; }
.pill { display: inline-block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.hero { display: grid; gap: 10px; padding: 26px 24px; }
.hero p { color: var(--muted); max-width: 60ch; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; padding: 0 24px 24px; }
.person { display: grid; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card-2); text-decoration: none; color: var(--fg); min-width: 0; }
.person:hover { border-color: var(--accent); }
.person .name { font-family: var(--font-display); font-weight: 600; overflow-wrap: anywhere; }
.person .sub { color: var(--muted); font-size: 0.85rem; overflow-wrap: anywhere; }
.panel { padding: 20px 24px; display: grid; gap: 22px; }
.settings { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.settings .wide { grid-column: 1 / -1; }
.days { display: flex; gap: 6px; flex-wrap: wrap; }
.days label { flex-direction: row; display: flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px; font-weight: 500; cursor: pointer; }
.days label:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.days input { width: auto; margin: 0; }
.linkbox { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 12px 14px; background: var(--card-2); border-radius: var(--radius); }
.linkbox code, .linkbox pre { font-family: var(--font-mono); font-size: 0.82rem; overflow-wrap: anywhere; white-space: pre-wrap; margin: 0; user-select: all; }
@media (max-width: 520px) { .linkbox { grid-template-columns: 1fr; } }
.blist { display: grid; gap: 8px; }
.brow { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 0.9rem; }
.brow time { font-family: var(--font-mono); font-size: 0.85rem; white-space: nowrap; }
.brow .who { min-width: 0; }
.brow .who span { display: block; color: var(--muted); font-size: 0.82rem; overflow-wrap: anywhere; }
@media (max-width: 520px) { .brow { grid-template-columns: 1fr; } }
.foot { font-size: 0.8rem; color: var(--muted); text-align: center; }
.switch { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; }
.switch input { width: auto; }
@media (prefers-reduced-motion: no-preference) { .day, .slot-btn, .btn, .person { transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease; } }
