/*
 * /book/ — web booking form (#182). Builds on ../crimemap/pages.css (palette, nav, .btn, .field, .form, footer).
 * Mobile first: one column, the summary under the form; side by side from 960px.
 * Buttons in the LEON brand blue (#007BBE, hover #1F9FE0) like the home page.
 */
:root { --brand: #007BBE; --brand-hi: #1F9FE0; }
.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.bk-hero { position: relative; padding: 44px 0 8px; overflow: hidden; }
.bk-hero::before { content: ''; position: absolute; inset: -40% -20% auto auto; width: 620px; height: 620px; background: radial-gradient(circle, rgba(0,123,190,.22), transparent 62%); pointer-events: none; }
.bk-hero .wrap { position: relative; }
.bk-hero h1 { font-size: clamp(32px, 6vw, 56px); font-weight: 800; }
.bk-hero .lead { color: var(--soft); font-size: 17px; margin: 14px 0 0; max-width: 640px; }

section.bk-section { padding: 28px 0 72px; }
.bk-layout { display: grid; grid-template-columns: 1fr; gap: 22px; align-items: start; }
.bk-main { min-width: 0; }

/* Steps */
.bk-steps { list-style: none; display: flex; gap: 8px; margin: 0 0 16px; padding: 0; }
.bk-steps li { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--card); min-width: 0; }
.bk-steps li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-steps b { flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: var(--surface); color: var(--soft); }
.bk-steps li.is-current { color: #fff; border-color: var(--brand); }
.bk-steps li.is-current b, .bk-steps li.is-done b { background: var(--brand); color: #fff; }
.bk-steps li.is-done { color: var(--soft); }

/* Brand-blue buttons */
.btn.blue { background: var(--brand); color: #fff; box-shadow: 0 10px 26px rgba(0,123,190,.3); }
.btn.blue:hover { background: var(--brand-hi); }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.form-actions .btn { flex: 1 1 auto; }

/* Service tabs (the app's three modes) */
.bk-tabs { border: 0; margin: 0 0 20px; padding: 4px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: var(--field); border-radius: 16px; }
.bk-tabs label { position: relative; min-width: 0; }
.bk-tabs input { position: absolute; opacity: 0; pointer-events: none; }
.bk-tabs span { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; padding: 10px 6px; border-radius: 12px; cursor: pointer; color: var(--soft); transition: background .15s, color .15s; }
.bk-tabs svg { width: 22px; height: 22px; }
.bk-tabs b { font-size: 14px; font-weight: 600; }
.bk-tabs small { font-size: 11px; color: var(--muted); line-height: 1.3; }
.bk-tabs input:checked + span { background: var(--brand); color: #fff; }
.bk-tabs input:checked + span small { color: rgba(255,255,255,.8); }
.bk-tabs input:focus-visible + span { outline: 2px solid var(--brand-hi); outline-offset: 2px; }

/* Address autocomplete */
.bk-place { position: relative; }
.bk-suggest { position: absolute; z-index: 30; left: 0; right: 0; top: 100%; margin: 6px 0 0; padding: 6px; list-style: none; background: #1A1E26; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 18px 40px rgba(0,0,0,.45); max-height: 320px; overflow-y: auto; }
.bk-suggest li { padding: 10px 12px; border-radius: 10px; cursor: pointer; font-size: 14.5px; line-height: 1.35; }
.bk-suggest li small { display: block; color: var(--muted); font-size: 12.5px; }
.bk-suggest li[aria-selected="true"], .bk-suggest li:hover { background: rgba(0,123,190,.22); }
.bk-suggest li.muted { cursor: default; color: var(--muted); background: none; }
.field input.is-set { border-color: rgba(0,123,190,.6); }
.field input.is-error, .field textarea.is-error { border-color: #F0868A; }

/* Options (vehicle classes / security types) */
.bk-options-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin: 28px 0 12px; }
.bk-options-head h2 { font-size: 19px; font-weight: 600; }
.bk-options { display: grid; grid-template-columns: 1fr; gap: 10px; }
.bk-empty { margin: 0; padding: 18px; border: 1px dashed var(--border); border-radius: 16px; color: var(--muted); font-size: 14.5px; text-align: center; }
.bk-opt { position: relative; display: grid; grid-template-columns: 84px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px 12px 12px; border: 1px solid var(--border); border-radius: 16px; background: var(--field); cursor: pointer; transition: border-color .15s, background .15s; }
.bk-opt input { position: absolute; opacity: 0; pointer-events: none; }
.bk-opt:hover { border-color: #4C515E; }
.bk-opt.is-selected { border-color: var(--brand); background: rgba(0,123,190,.12); }
.bk-opt:focus-within { outline: 2px solid var(--brand-hi); outline-offset: 2px; }
.bk-opt.is-off { opacity: .55; cursor: not-allowed; }
.bk-opt .pic { width: 84px; height: 52px; border-radius: 10px; background: var(--surface) center / contain no-repeat; }
.bk-opt .txt { min-width: 0; }
.bk-opt .txt b { display: block; font-size: 15.5px; font-weight: 600; }
.bk-opt .txt small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; }
.bk-opt .meta { display: flex; flex-wrap: wrap; gap: 2px 10px; color: var(--soft); font-size: 12.5px; margin-top: 3px; }
.bk-opt .meta span { white-space: nowrap; }
.bk-opt.no-pic { grid-template-columns: 1fr auto; padding-left: 16px; }
.bk-opt.no-pic .pic { display: none; }
.bk-opt .price { text-align: right; font-size: 17px; font-weight: 700; white-space: nowrap; }
.bk-opt .price small { display: block; font-size: 11.5px; font-weight: 500; color: var(--muted); }
.bk-opt.is-loading .price, .bk-opt.is-loading .txt b { color: transparent; background: linear-gradient(90deg, var(--surface), #2E333D, var(--surface)); background-size: 200% 100%; border-radius: 6px; animation: bk-shimmer 1.2s infinite linear; }
@keyframes bk-shimmer { to { background-position: -200% 0; } }

/* Payment */
.bk-payment { min-height: 60px; margin: 6px 0 4px; }
.bk-secure { display: flex; align-items: center; gap: 8px; margin: 16px 0 0; }
.bk-secure svg { width: 16px; height: 16px; flex-shrink: 0; }
#pay-mode-text { color: var(--soft); font-size: 14.5px; margin: 0 0 18px; }

/* Summary */
.bk-summary { background: var(--card); border: 1px solid var(--border); border-radius: 22px; padding: 20px; }
.bk-summary h2 { font-size: 17px; font-weight: 600; margin-bottom: 12px; }
.bk-summary dl { margin: 0; display: grid; gap: 10px; }
.bk-summary dl div { display: grid; grid-template-columns: 76px 1fr; gap: 10px; font-size: 14px; }
.bk-summary dt { color: var(--muted); }
.bk-summary dd { margin: 0; color: #fff; overflow-wrap: anywhere; }
.bk-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--border); margin: 16px 0 10px; padding-top: 14px; font-size: 15px; color: var(--soft); }
.bk-total b { font-size: 24px; color: #fff; }

/* Done */
.bk-done { text-align: center; }
.bk-done .tick { width: 58px; height: 58px; border-radius: 50%; margin: 4px auto 16px; display: grid; place-items: center; background: rgba(48,164,108,.16); }
.bk-done h3 { font-size: 24px; }
.bk-done > p { color: var(--soft); max-width: 520px; margin: 10px auto 0; }
.bk-ref b { display: inline-block; margin-left: 6px; font-size: 20px; color: #fff; letter-spacing: .04em; }
.bk-app { margin: 26px 0 22px; padding: 20px; border-radius: 18px; background: var(--field); border: 1px solid var(--border); }
.bk-app h4 { margin: 0 0 6px; font-size: 17px; }
.bk-app p { margin: 0 0 16px; color: var(--soft); font-size: 14.5px; }
.stores { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.badge { display: inline-flex; align-items: center; gap: 11px; height: 54px; padding: 0 18px; background: #000; border: 1px solid #3a3f4b; border-radius: 13px; text-decoration: none; color: #fff; text-align: left; }
.badge:hover { border-color: #6b7080; }
.badge svg { width: 26px; height: 26px; flex-shrink: 0; }
.badge small { display: block; font-size: 10.5px; line-height: 1; opacity: .8; }
.badge b { display: block; font-size: 17px; font-weight: 600; line-height: 1.25; white-space: nowrap; }

@media (min-width: 640px) {
  .bk-options { grid-template-columns: 1fr 1fr; }
  .form-actions .btn { flex: 0 0 auto; }
}
@media (min-width: 960px) {
  .bk-hero { padding: 64px 0 12px; }
  .bk-layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; }
  .bk-summary { position: sticky; top: 88px; }
}
@media (max-width: 600px) {
  #step1 .fields { grid-template-columns: 1fr 1fr; gap: 14px 12px; }
  .bk-opt { grid-template-columns: 64px 1fr auto; }
  .bk-opt .pic { width: 64px; height: 44px; }
  .bk-steps li { padding: 8px; font-size: 12px; }
  .bk-steps li:not(.is-current) { flex: 0 0 auto; }
  .bk-steps li:not(.is-current) span { display: none; }
}
@media (max-width: 400px) {
  .bk-opt, .bk-opt.no-pic { grid-template-columns: 1fr auto; padding-left: 14px; }
  .bk-opt .pic { display: none; }
}
@media (prefers-reduced-motion: reduce) { .bk-opt.is-loading .price, .bk-opt.is-loading .txt b { animation: none; } }
