/* Frappe CRM Suite Pro - public demo booking widget. Plain CSS, no build. Prefix: bk- */
:root {
	--bg: #f4f4f5; --card: #ffffff; --fg: #111113; --muted: #62626b; --faint: #8b8b95; --line: #e4e4e7; --line-strong: #cfcfd6;
	--soft: #f6f6f8; --hover: #f1f1f4; --danger: #c62828; --danger-bg: #fdecec; --warn-bg: #fff6e0; --warn-fg: #7a5200; --ok: #16a34a;
	--shadow: 0 1px 2px rgba(16, 16, 24, .04), 0 12px 40px -12px rgba(16, 16, 24, .14);
	--ac: #2563eb; --ac-fg: #fff; --ac-text: #2563eb; --r: 12px;
	--font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	color-scheme: light;
}
:root[data-theme="dark"] {
	--bg: #08080a; --card: #111113; --fg: #f4f4f5; --muted: #a1a1aa; --faint: #71717a; --line: #26262b; --line-strong: #3a3a42;
	--soft: #17171a; --hover: #1d1d21; --danger: #ff8a80; --danger-bg: #2a1515; --warn-bg: #2b2210; --warn-fg: #f3cf7d; --ok: #4ade80;
	--shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 16px 48px -12px rgba(0, 0, 0, .7);
	color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
html.bk-embed, html.bk-embed body { background: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--ac-text); outline-offset: 2px; border-radius: 8px; }
.sk { background: linear-gradient(90deg, var(--soft) 25%, var(--hover) 37%, var(--soft) 63%); background-size: 400% 100%; animation: bk-shim 1.4s ease infinite; border-radius: 8px; display: block; }
@keyframes bk-shim { 0% { background-position: 100% 0 } 100% { background-position: 0 0 } }

#app { width: 100%; max-width: 1060px; margin: 0 auto; padding: 40px 16px 32px; }
html.bk-embed #app { padding: 12px; }

/* card */
.bk-card { display: grid; grid-template-columns: 290px minmax(0, 1fr); background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); min-height: 480px; animation: bk-in .35s ease both; }
html.bk-embed .bk-card { box-shadow: none; }
.bk-card.done, .bk-card.single { display: block; max-width: 560px; margin: 0 auto; }
.bk-card.two { grid-template-columns: 290px minmax(0, 1fr); }
@keyframes bk-in { from { opacity: 0; transform: translateY(6px) } to { opacity: 1; transform: none } }

/* left panel */
.bk-panel { padding: 28px 24px; border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; }
.bk-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; min-width: 0; }
.bk-logo { max-height: 40px; max-width: 160px; width: auto; height: auto; border-radius: 8px; object-fit: contain; }
.bk-brand-name { font-weight: 600; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.bk-title { margin: 0; font-size: 24px; line-height: 1.2; letter-spacing: -.02em; font-weight: 650; overflow-wrap: anywhere; }
.bk-subtitle { margin: 6px 0 0; color: var(--muted); font-weight: 500; }
.bk-desc-wrap { margin-top: 12px; }
.bk-desc { margin: 0; color: var(--muted); white-space: pre-line; overflow-wrap: anywhere; }
.bk-desc.clamp { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.bk-meta { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 12px; color: var(--muted); }
.bk-meta li { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; min-width: 0; }
.bk-meta svg { flex: none; margin-top: 2px; color: var(--faint); }
.bk-meta-when { color: var(--fg); }
.bk-meta-when b { font-weight: 600; }
.bk-meta-tz { margin-left: -8px; }
.bk-panel-note { margin-top: auto; padding-top: 16px; color: var(--faint); font-size: 12.5px; }
.bk-link-btn { background: none; border: 0; padding: 0; color: var(--ac-text); font-weight: 600; text-decoration: none; margin-top: 6px; }
.bk-link-btn:hover { text-decoration: underline; }

/* time zone */
.bk-tz { position: relative; min-width: 0; }
.bk-tz-btn { display: inline-flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; border: 0; background: none; color: var(--muted); font-weight: 500; max-width: 100%; text-align: left; }
.bk-tz-btn:hover { background: var(--hover); color: var(--fg); }
.bk-tz-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-pop { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: 320px; max-width: calc(100vw - 32px); background: var(--card); border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: var(--shadow); padding: 8px; }
.bk-search { display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--faint); }
.bk-search input { flex: 1; border: 0; background: none; height: 38px; outline: none; min-width: 0; color: var(--fg); }
.bk-search:focus-within { border-color: var(--ac-text); }
.bk-list { list-style: none; margin: 8px 0 0; padding: 0; max-height: 240px; overflow-y: auto; overscroll-behavior: contain; }
.bk-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; justify-content: space-between; }
.bk-list li span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-list li small { color: var(--faint); flex: none; }
.bk-list li.on { background: var(--hover); }
.bk-list li.sel { font-weight: 600; }
.bk-list-empty { color: var(--faint); cursor: default !important; }

/* scheduler */
.bk-sched { padding: 24px 24px 24px; min-width: 0; }
.bk-sched-cols { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 28px; }
.bk-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.bk-cal-title { margin: 0; font-size: 16px; font-weight: 650; letter-spacing: -.01em; }
.bk-cal-nav { display: flex; gap: 4px; }
.bk-icon-btn { width: 34px; height: 34px; display: inline-grid; place-items: center; border: 0; background: none; border-radius: 10px; color: var(--muted); }
.bk-icon-btn:hover:not(:disabled) { background: var(--hover); color: var(--fg); }
.bk-icon-btn:disabled { opacity: .35; cursor: default; }
.bk-grid { display: grid; gap: 6px; }
.bk-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.bk-wd div { text-align: center; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); padding: 4px 0 6px; }
.bk-cell { aspect-ratio: 1 / 1; min-height: 38px; max-height: 52px; display: grid; }
.bk-cell .bk-day { width: 100%; height: 100%; }
.bk-day { position: relative; border: 0; background: transparent; border-radius: 12px; font-weight: 500; color: var(--faint); font-variant-numeric: tabular-nums; display: grid; place-items: center; transition: background .12s, color .12s; }
.bk-day[aria-disabled="true"] { cursor: default; opacity: .55; }
.bk-day.ok { background: var(--hover); color: var(--fg); font-weight: 650; }
.bk-day.ok:hover { background: var(--line); }
.bk-day.sel, .bk-day.sel:hover { background: var(--ac); color: var(--ac-fg); }
.bk-day.today::after { content: ""; position: absolute; bottom: 5px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; opacity: .7; }
.bk-day.sk { animation: bk-shim 1.4s ease infinite; background: linear-gradient(90deg, var(--soft) 25%, var(--hover) 37%, var(--soft) 63%); background-size: 400% 100%; }
.bk-skel-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 18px; }
.bk-skel-grid span { aspect-ratio: 1; border-radius: 12px; }

/* slots */
.bk-slots { min-width: 0; display: flex; flex-direction: column; }
.bk-slots-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; min-height: 34px; }
.bk-slots-title { margin: 0; font-size: 15px; font-weight: 500; color: var(--muted); }
.bk-slots-title b { color: var(--fg); font-weight: 650; }
.bk-seg { display: inline-flex; padding: 2px; border-radius: 9px; background: var(--hover); }
.bk-seg button { border: 0; background: none; padding: 3px 9px; border-radius: 7px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.bk-seg button.on { background: var(--card); color: var(--fg); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.bk-slot-list { display: grid; gap: 8px; max-height: 392px; overflow-y: auto; padding: 1px 4px 1px 1px; overscroll-behavior: contain; scrollbar-width: thin; align-content: start; }
.bk-slot { display: flex; align-items: center; justify-content: center; gap: 8px; height: 42px; border: 1px solid var(--line-strong); background: transparent; border-radius: 11px; font-weight: 600; font-variant-numeric: tabular-nums; transition: border-color .12s, background .12s; }
.bk-slot:hover { border-color: var(--fg); background: var(--hover); }
.bk-slot.sk { border: 0; }
.bk-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: none; }
.bk-empty { border: 1px dashed var(--line-strong); border-radius: 14px; padding: 22px 16px; text-align: center; color: var(--muted); display: grid; gap: 4px; justify-items: center; }
.bk-empty p { margin: 0; }
.bk-empty b { color: var(--fg); }
.bk-empty.soft { border-style: solid; border-color: transparent; background: var(--soft); }

/* banners */
.bk-banner { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; margin-bottom: 14px; font-weight: 500; }
.bk-banner svg { flex: none; margin-top: 2px; }
.bk-banner.err { background: var(--danger-bg); color: var(--danger); }
.bk-banner.warn { background: var(--warn-bg); color: var(--warn-fg); }

/* form */
.bk-formwrap { padding: 28px 32px 28px; max-width: 600px; min-width: 0; width: 100%; }
.bk-form-title { margin: 0 0 18px; font-size: 18px; font-weight: 650; letter-spacing: -.01em; }
.bk-form { display: grid; gap: 16px; }
.bk-field { display: grid; gap: 6px; min-width: 0; }
.bk-label { font-weight: 600; font-size: 13.5px; }
.bk-req { color: var(--danger); font-style: normal; }
.bk-opt { margin-left: 6px; font-weight: 400; color: var(--faint); font-size: 12px; }
.bk-form input[type=text], .bk-form input[type=email], .bk-form input[type=tel], .bk-form select, .bk-form textarea, .bk-formwrap textarea {
	width: 100%; border: 1px solid var(--line-strong); background: transparent; border-radius: 10px; padding: 0 12px; height: 42px; outline: none; transition: border-color .12s, box-shadow .12s; }
.bk-form textarea, .bk-formwrap textarea { height: auto; padding: 10px 12px; resize: vertical; min-height: 84px; width: 100%; border: 1px solid var(--line-strong); border-radius: 10px; background: transparent; outline: none; }
.bk-form input:focus, .bk-form select:focus, .bk-form textarea:focus, .bk-formwrap textarea:focus { border-color: var(--ac-text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ac-text) 22%, transparent); }
.bk-form [aria-invalid="true"], .bk-phone.bad { border-color: var(--danger) !important; }
.bk-form input::placeholder, .bk-form textarea::placeholder, .bk-formwrap textarea::placeholder { color: var(--faint); }
.bk-err { margin: 0; color: var(--danger); font-size: 12.5px; font-weight: 500; }
.bk-select { position: relative; }
.bk-select select { appearance: none; -webkit-appearance: none; padding-right: 36px !important; }
.bk-select svg { position: absolute; right: 12px; top: 50%; margin-top: -8px; pointer-events: none; color: var(--faint); }
.bk-select option { color: #111; }
.bk-phone { position: relative; display: flex; border: 1px solid var(--line-strong); border-radius: 10px; }
.bk-phone:focus-within { border-color: var(--ac-text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ac-text) 22%, transparent); }
.bk-phone input { border: 0 !important; box-shadow: none !important; flex: 1; min-width: 0; border-radius: 0 10px 10px 0 !important; }
.bk-cc { display: inline-flex; align-items: center; gap: 6px; padding: 0 10px 0 12px; border: 0; background: none; border-right: 1px solid var(--line); border-radius: 10px 0 0 10px; color: var(--muted); font-weight: 500; }
.bk-cc:hover { background: var(--hover); }
.bk-flag { font-size: 18px; line-height: 1; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.bk-cc-pop { width: 300px; }
.bk-cc-pop li small { color: var(--faint); }
.bk-hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.bk-ghost-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--muted); font-weight: 600; padding: 6px 8px; margin-left: -8px; border-radius: 8px; }
.bk-ghost-btn:hover { background: var(--hover); color: var(--fg); }
.bk-guest { display: grid; grid-template-columns: 1fr auto; gap: 6px; margin: 8px 0; align-items: center; }
.bk-guest .bk-err { grid-column: 1 / -1; }
.bk-check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-weight: 500; line-height: 1.4; }
.bk-check input { position: absolute; opacity: 0; width: 18px; height: 18px; margin: 0; }
.bk-box { flex: none; width: 18px; height: 18px; margin-top: 1px; border: 1px solid var(--line-strong); border-radius: 5px; display: grid; place-items: center; color: transparent; transition: background .12s; }
.bk-check input:checked + .bk-box { background: var(--ac); border-color: var(--ac); color: var(--ac-fg); }
.bk-check input:focus-visible + .bk-box { outline: 2px solid var(--ac-text); outline-offset: 2px; }
.bk-consent { color: var(--muted); font-size: 13px; font-weight: 400; }
.bk-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.bk-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 20px; border-radius: 11px; font-weight: 650; border: 1px solid transparent; text-decoration: none; transition: filter .12s, background .12s, transform .06s; white-space: nowrap; }
.bk-btn:active:not(:disabled) { transform: translateY(1px); }
.bk-btn.primary { background: var(--ac); color: var(--ac-fg); }
.bk-btn.primary:hover:not(:disabled) { filter: brightness(1.08); }
.bk-btn.ghost { background: transparent; border-color: var(--line-strong); color: var(--fg); }
.bk-btn.ghost:hover:not(:disabled) { background: var(--hover); }
.bk-btn.danger { background: var(--danger); color: #fff; }
:root[data-theme="dark"] .bk-btn.danger { color: #1a0707; }
:root[data-theme="dark"] .bk-btn.danger.ghost { color: var(--danger); }
.bk-btn.danger.ghost { background: transparent; color: var(--danger); border-color: var(--line-strong); }
.bk-btn:disabled { opacity: .5; cursor: not-allowed; }
.bk-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: bk-rot .7s linear infinite; }
@keyframes bk-rot { to { transform: rotate(360deg) } }

/* confirmation / manage */
.bk-done { padding: 44px 36px 36px; text-align: center; }
.bk-tick { width: 52px; height: 52px; border-radius: 50%; margin: 0 auto 16px; display: grid; place-items: center; background: var(--ac); color: var(--ac-fg); animation: bk-pop .4s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes bk-pop { from { transform: scale(.6); opacity: 0 } to { transform: none; opacity: 1 } }
.bk-done-title { margin: 0; font-size: 24px; font-weight: 650; letter-spacing: -.02em; outline: none; }
.bk-done-text { margin: 8px auto 0; color: var(--muted); max-width: 40ch; }
.bk-summary { text-align: left; margin: 26px 0 0; display: grid; gap: 0; border: 1px solid var(--line); border-radius: 14px; padding: 4px 18px; background: var(--soft); }
.bk-summary > div { display: grid; grid-template-columns: 70px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.bk-summary > div:first-child { border-top: 0; }
.bk-summary dt { color: var(--faint); font-weight: 600; }
.bk-summary dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.bk-summary .d { font-weight: 650; }
.bk-summary.strike dd { text-decoration: line-through; color: var(--faint); }
.bk-done-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 22px; }
.bk-menu { position: relative; }
.bk-menu-pop { width: 240px; left: auto; right: 0; padding: 6px; display: grid; text-align: left; }
.bk-menu-pop a, .bk-menu-pop button { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; border: 0; background: none; border-radius: 8px; color: var(--fg); text-decoration: none; font-weight: 500; text-align: left; }
.bk-menu-pop a:hover, .bk-menu-pop button:hover { background: var(--hover); }
.bk-done-manage, .bk-redirect { margin: 18px 0 0; color: var(--muted); }
.bk-done-manage a { color: var(--ac-text); font-weight: 600; }
.bk-muted { color: var(--muted); margin: 0 0 14px; }
.bk-status { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 650; margin-bottom: 10px; background: var(--hover); color: var(--muted); }
.bk-status.good { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.bk-status.bad { background: var(--danger-bg); color: var(--danger); }
.bk-formwrap .bk-summary { margin: 0 0 18px; }
.bk-formwrap .bk-label { display: block; margin-bottom: 6px; }
.bk-state { padding: 52px 32px; text-align: center; display: grid; gap: 8px; justify-items: center; }
.bk-state h1 { margin: 6px 0 0; font-size: 20px; letter-spacing: -.01em; }
.bk-state p { margin: 0; color: var(--muted); max-width: 42ch; }
.bk-state .bk-btn { margin-top: 12px; }
.bk-state-ico { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--hover); color: var(--muted); }
.bk-footer { text-align: center; color: var(--faint); font-size: 12.5px; margin-top: 16px; overflow-wrap: anywhere; }
.bk-skel-card { pointer-events: none; }
.bk-skel-card .bk-panel { border-right: 1px solid var(--line); }

/* narrow: stacked */
@media (max-width: 860px) {
	#app { padding: 16px 12px 24px; }
	.bk-card, .bk-card.two { grid-template-columns: 1fr; border-radius: 18px; min-height: 0; }
	.bk-panel { border-right: 0; border-bottom: 1px solid var(--line); padding: 20px 20px 18px; }
	.bk-title { font-size: 21px; }
	.bk-meta { margin-top: 16px; gap: 8px; }
	.bk-sched { padding: 18px 16px 20px; }
	.bk-sched-cols { grid-template-columns: 1fr; gap: 22px; }
	.bk-slot-list { max-height: none; grid-template-columns: repeat(2, 1fr); overflow: visible; }
	.bk-formwrap { padding: 20px 20px 96px; max-width: none; }
	.bk-actions { position: sticky; bottom: 0; margin: 8px -20px -96px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); border-radius: 0 0 18px 18px; z-index: 5; }
	.bk-actions .bk-btn { flex: 1; }
	.bk-actions .bk-btn.ghost { flex: 0 0 auto; }
	.bk-done { padding: 32px 20px 28px; }
	.bk-cal-title { font-size: 15.5px; }
	.bk-pop { position: fixed; left: 12px; right: 12px; top: auto; bottom: 12px; width: auto; max-width: none; }
	.bk-menu-pop { position: absolute; left: 0; right: auto; bottom: auto; top: calc(100% + 6px); }
	.bk-list { max-height: 50vh; }
	.bk-list li { padding: 12px 10px; }
	html.bk-embed #app { padding: 0; }
	html.bk-embed .bk-card { border: 0; border-radius: 0; }
}
@media (max-width: 400px) { .bk-actions .bk-btn { padding: 0 14px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition: none !important; scroll-behavior: auto !important; } }

/* pop-up as a full-screen sheet on phones: opaque, room for the close button */
html.bk-sheet, html.bk-sheet body { background: var(--card); }
html.bk-sheet .bk-panel { padding-right: 60px; }

.bk-banner.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }

.bk-sel { position: relative; }
.bk-sel-btn { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--card); color: var(--fg); font: inherit; text-align: left; cursor: pointer; }
.bk-sel-btn:focus-visible, .bk-sel-btn[aria-expanded="true"] { outline: 0; border-color: var(--ac-text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ac-text) 22%, transparent); }
.bk-sel-btn .ph { color: var(--faint); } .bk-sel-btn svg { color: var(--faint); flex: none; }
.bk-sel.bad .bk-sel-btn { border-color: var(--danger); } .bk-sel-pop { width: 100%; }
