/* Public booking page + patient manage page. Builds on app.css tokens; clinic colours are injected inline. */
.bk-body { background: var(--bg); min-height: 100vh; }
.bk-body.is-embed { background: transparent; }
.bk { max-width: 760px; margin: 0 auto; padding: 24px 16px 48px; }
.is-embed .bk { padding: 8px 0 16px; max-width: none; }
.bk-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.bk-logo { height: 52px; width: auto; max-width: 200px; object-fit: contain; }
.bk-title { font-size: 1.4rem; margin: 0; }
.bk-sub { margin: 0; color: var(--text-2); font-size: .9rem; }
.bk-phone { margin-left: auto; }
.bk-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--sh-md); padding: 1.5rem; }
.is-embed .bk-card { box-shadow: none; }
@media (max-width: 600px) { .bk-card { padding: 1.1rem; border-radius: var(--r-lg); } }
.bk-foot { text-align: center; color: var(--text-3); font-size: .8rem; margin-top: 1.5rem; }
.bk-note { margin: 1.25rem 0 0; padding: .8rem 1rem; background: var(--warning-soft); color: var(--warning); border-radius: var(--r-md); font-size: .875rem; }

/* progress */
.bk-steps { list-style: none; display: flex; gap: .25rem; padding: 0; margin: 0 0 1.25rem; overflow-x: auto; }
.bk-steps li { flex: 1; min-width: 60px; display: flex; flex-direction: column; align-items: center; gap: .3rem; font-size: .7rem; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; position: relative; }
.bk-steps li span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--text-3); font-size: .75rem; }
.bk-steps li.is-current span { background: var(--primary); color: #fff; }
.bk-steps li.is-current { color: var(--text); }
.bk-steps li.is-done span { background: var(--primary-soft); color: var(--primary); }
.bk-steps li.is-done { color: var(--primary); cursor: pointer; }
@media (max-width: 520px) { .bk-steps li { font-size: 0; gap: 0; min-width: 34px; } .bk-steps li span { font-size: .75rem; } }

/* summary chips */
.bk-summary { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.bk-summary .chip { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .7rem; border-radius: var(--r-full); background: var(--primary-soft); color: var(--primary); font-size: .8rem; font-weight: 600; cursor: pointer; border: 0; font-family: inherit; }
.bk-summary .chip:hover { filter: brightness(.97); }

.bk-panel h2 { font-size: 1.2rem; margin-bottom: .25rem; }
.bk-panel .lead { color: var(--text-2); margin-bottom: 1rem; font-size: .925rem; }
.bk-nav { display: flex; align-items: center; gap: .75rem; margin-top: 1.25rem; }

/* option cards (services / dentists) */
.opt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: .75rem; }
.opt { text-align: left; display: flex; gap: .85rem; align-items: flex-start; padding: 1rem; border: 1.5px solid var(--border); border-radius: var(--r-lg); background: var(--surface); cursor: pointer; font: inherit; color: var(--text); transition: border-color var(--dur), box-shadow var(--dur), transform var(--dur); }
.opt:hover { border-color: var(--primary); box-shadow: var(--sh-md); transform: translateY(-1px); }
.opt:focus-visible { border-color: var(--primary); }
.opt.is-selected { border-color: var(--primary); background: var(--primary-soft); }
.opt .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--primary-soft); display: grid; place-items: center; font-size: 1.3rem; flex: none; overflow: hidden; }
.opt .ico img { width: 100%; height: 100%; object-fit: cover; }
.opt strong { display: block; font-size: .95rem; margin-bottom: .1rem; }
.opt small { color: var(--text-2); display: block; line-height: 1.4; }
.opt .meta { margin-top: .35rem; font-size: .75rem; color: var(--text-3); font-weight: 600; }
.opt .avatar { width: 48px; height: 48px; font-size: 1rem; }
.opt-any { border-style: dashed; }
.cat-h { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); font-weight: 700; margin: 1rem 0 .5rem; }
.cat-h:first-child { margin-top: 0; }

/* calendar */
.bk-cal { max-width: 420px; }
.bk-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .5rem; }
.bk-cal-head strong { font-size: 1rem; }
.bk-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.bk-cal-grid .dow { text-align: center; font-size: .7rem; font-weight: 700; color: var(--text-3); padding: .3rem 0; }
.bk-day { aspect-ratio: 1; border: 0; border-radius: 10px; background: transparent; font: inherit; font-weight: 600; color: var(--text-3); cursor: default; position: relative; }
.bk-day.is-avail { background: var(--primary-soft); color: var(--primary); cursor: pointer; }
.bk-day.is-avail:hover { background: var(--primary); color: #fff; }
.bk-day.is-selected { background: var(--primary) !important; color: #fff !important; box-shadow: var(--sh-md); }
.bk-day.is-today::after { content: ""; position: absolute; bottom: 5px; left: 50%; transform: translateX(-50%); width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.bk-day:disabled { opacity: .45; }

/* time slots */
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: .5rem; }
.slot { padding: .7rem .5rem; border: 1.5px solid var(--border); border-radius: var(--r-md); background: var(--surface); font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; color: var(--text); transition: border-color var(--dur), background var(--dur); }
.slot:hover { border-color: var(--primary); background: var(--primary-soft); }
.slot.is-selected { background: var(--primary); border-color: var(--primary); color: #fff; }
.slot-group h4 { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); margin: 1rem 0 .5rem; }
.slot-group:first-child h4 { margin-top: 0; }
.bk-datetime { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 1.5rem; }
@media (max-width: 640px) { .bk-datetime { grid-template-columns: 1fr; } }

/* details form */
.bk-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.bk-form .span-2 { grid-column: span 2; }
@media (max-width: 560px) { .bk-form { grid-template-columns: 1fr; } .bk-form .span-2 { grid-column: auto; } }

/* review + confirmation */
.review { border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.review div { display: grid; grid-template-columns: 110px 1fr; gap: 1rem; padding: .7rem 1rem; border-bottom: 1px solid var(--border); font-size: .925rem; }
.review div:last-child { border-bottom: 0; }
.review span:first-child { color: var(--text-3); }
.confirm-hero { text-align: center; padding: 1rem 0 .5rem; }
.confirm-hero .tick { width: 64px; height: 64px; border-radius: 50%; background: var(--success-soft); color: var(--success); display: grid; place-items: center; font-size: 1.8rem; margin: 0 auto 1rem; animation: pop .4s var(--ease); }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.confirm-actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin-top: 1.25rem; }
.bk-err { color: var(--danger); background: var(--danger-soft); padding: .7rem .9rem; border-radius: var(--r-md); font-size: .9rem; margin-bottom: 1rem; }
