/* 预约一页下单 (account-book.js; docs/booking-one-page.md): one page, sections top to bottom, the order summary on the right
   on wide screens, a bottom bar with the price and the button on phones. Tap targets at least 44 px; nothing wider than
   the screen (the day strip scrolls inside itself). Builds on site.css and account.css. */
.op-grid { display: grid; gap: 16px; align-items: start; margin-top: 12px; }
.op-main { min-width: 0; display: grid; gap: 12px; }
.op-sec { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: var(--shadow); min-width: 0; } /* site.css gives every section a margin */
.op-sec > h2 { display: flex; align-items: center; gap: 10px; font-size: 1.08rem; margin: 0 0 12px; }
.op-n { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-dark); font-size: .8rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.op-sec .fld { margin: 10px 0; }
.op-sec .fld > label, .op-q-l { font-weight: 600; font-size: .95rem; }
.op-sec-err { margin: 10px 0 0; }

/* buttons that toggle (packages, chips, days, windows): aria-pressed */
.op-pkg, .op-chip, .op-day, .op-win { position: relative; font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line-2); cursor: pointer; transition: border-color .12s, background .12s, box-shadow .12s; }
.op-pkg:hover, .op-chip:hover, .op-day:hover:not(:disabled), .op-win:hover:not(:disabled) { border-color: #b6c2bd; }
.op-pkg[aria-pressed="true"], .op-chip[aria-pressed="true"], .op-day[aria-pressed="true"], .op-win[aria-pressed="true"] { border-color: var(--brand); background: #f6fbf9; box-shadow: inset 0 0 0 1px var(--brand); color: var(--brand-dark); }
.op-pkg:focus-visible, .op-chip:focus-visible, .op-day:focus-visible, .op-win:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.op-day:disabled, .op-win:disabled { cursor: not-allowed; color: var(--muted); background: var(--surface); border-style: dashed; }

.op-pkgs { display: grid; gap: 10px; }
.op-pkgs.two { grid-template-columns: 1fr 1fr; }
.op-pkg { display: grid; gap: 3px; justify-items: start; text-align: left; border-radius: 14px; padding: 14px 16px; min-height: 64px; }
.op-pkg strong { font-size: 1.02rem; font-weight: 650; }
.op-pkg .op-price { color: var(--brand-dark); font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.op-pkgs.two .op-pkg { justify-items: center; text-align: center; padding: 16px 10px; }
.op-pkgs.two .op-pkg strong { font-size: 1.15rem; }
.op-pkgs.two .op-pkg .op-price { font-size: 1.3rem; }
.op-hours { max-width: 320px; }
.op-more { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 8px; }
.op-more > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font-weight: 600; }
.op-more .addons { display: grid; gap: 8px; margin-top: 6px; }
.op-more .addon select { width: auto; min-width: 72px; min-height: 44px; }
.op-more .addon input[type="checkbox"] { width: 22px; height: 22px; }

/* addresses: street + ZIP side by side (ZIP under it on narrow phones) */
.op-addr { display: grid; grid-template-columns: minmax(0, 1fr) 110px; column-gap: 10px; align-items: end; margin: 4px 0 10px; }
.op-addr .op-line, .op-addr .op-zip { margin: 6px 0 0; }
.op-addr .op-locate, .op-addr .op-addr-hint, .op-addr .op-recent { grid-column: 1 / -1; }
.op-addr-hint { margin: 6px 0 0; }
.op-ac { position: relative; }
.op-sug { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); list-style: none; margin: 0; padding: 4px; background: #fff; border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--lift); max-height: 320px; overflow-y: auto; }
.op-sug li[role="option"] { display: grid; gap: 1px; min-height: 44px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.op-sug li[role="option"]:hover, .op-sug li[aria-selected="true"] { background: var(--surface); }
.op-sug-by { text-align: right; font-size: .7rem; color: var(--muted); padding: 2px 8px 4px; }
.op-locate { display: inline-flex; align-items: center; gap: 6px; justify-self: start; min-height: 44px; color: var(--brand); font-weight: 600; padding: 6px 2px; }
.op-locate .ico { width: 18px; height: 18px; }
.op-recent { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.op-miles { margin: 4px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; font-size: .92rem; }

/* days and time windows */
.op-days { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; padding: 2px 2px 8px; margin: 0 -2px 6px; scrollbar-width: thin; }
.op-day { flex: 0 0 64px; scroll-snap-align: start; display: grid; justify-items: center; gap: 1px; border-radius: 12px; padding: 8px 4px; min-height: 60px; font-variant-numeric: tabular-nums; }
.op-day b { font-size: 1rem; }
.op-day small { font-size: .74rem; color: var(--muted); }
.op-day[aria-pressed="true"] small { color: var(--brand-dark); }
.op-wins { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.op-win { display: grid; gap: 4px; align-content: start; text-align: left; border-radius: 14px; padding: 14px; min-height: 72px; }
.op-win b { font-size: 1rem; font-weight: 650; }
.op-win small { font-size: .8rem; line-height: 1.35; }
.op-win .op-full { color: var(--danger); }
.op-time { max-width: 320px; }
.op-wait { padding: 12px 0; }

/* quick picks */
.op-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.op-chip { border-radius: 999px; padding: 8px 16px; min-height: 44px; font-size: .95rem; }
.op-chip.small { min-height: 36px; padding: 4px 12px; font-size: .85rem; }
.op-q { display: grid; gap: 4px; }
.op-thumbs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 6px 0; }
.op-thumbs:empty { display: none; }
.op-thumb { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--surface); }
.op-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.op-x { position: absolute; top: 2px; right: 2px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(15, 23, 20, .7); color: #fff; font-size: 1.1rem; line-height: 1; cursor: pointer; }
.op-add-photo { justify-self: start; cursor: pointer; }
/* the file box stays 1 px: `.fld input` (width 100 %, padding) made it as wide as the page and pushed it sideways */
.op-sec .fld input.sr-only { width: 1px; height: 1px; min-height: 0; padding: 0; border: 0; }
.op-photos input[type="file"]:focus-visible + .op-add-photo { outline: 2px solid var(--brand); outline-offset: 2px; }

/* contact */
.op-who { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.op-who > span { display: inline-flex; align-items: center; gap: 8px; min-width: 0; overflow-wrap: anywhere; }
.op-who .ico { width: 18px; height: 18px; color: var(--muted); flex: none; }
.op-who .btn-text { min-height: 44px; color: var(--brand); font-weight: 600; }
.op-two { display: grid; gap: 0 12px; }
@media (min-width: 560px) { .op-two { grid-template-columns: 1fr 1fr; } }
#op-signin .acct-card { box-shadow: none; margin: 10px 0 0; background: #fbfcfc; }

/* the summary card and the price */
.op-side .sum-card { margin: 0; }
.op-fee { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: .9rem; }
.op-fee td { padding: 3px 0; color: var(--ink-2); }
.op-fee .num { text-align: right; font-variant-numeric: tabular-nums; }
.op-side .op-go2 { margin-top: 14px; }

/* the bottom bar (phones): the price on the left, the button on the right */
.op-bar { display: none; }
@media (min-width: 900px) {
  .op-grid { grid-template-columns: minmax(0, 1fr) 340px; }
  .op-side { position: sticky; top: 80px; }
  .op-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); overflow: visible; padding: 2px 0 4px; margin: 0 0 8px; } /* two weeks, two rows */
  .op-day { min-width: 0; }
}
@media (max-width: 899px) {
  .op-side .op-go2, .op-side #op-err2 { display: none; }
  .page-acct.view-book.op-on { padding-bottom: calc(96px + env(safe-area-inset-bottom)); } /* account.css sets 0 on the booking page */
  .op-bar { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(255, 255, 255, .97); backdrop-filter: saturate(1.4) blur(10px); border-top: 1px solid var(--line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
  .op-bar-err { margin: 0 0 8px; }
  .op-bar-in { display: flex; align-items: center; gap: 12px; max-width: 760px; margin: 0 auto; }
  .op-bar-amt { flex: 1; min-width: 0; line-height: 1.2; }
  .op-bar-amt small { display: block; color: var(--muted); font-size: .76rem; }
  .op-bar-amt b { font-size: 1.25rem; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
  .op-bar .btn { min-height: 48px; padding: 0 22px; }
}
@media (max-width: 420px) {
  .op-sec { padding: 16px 14px; }
  .op-addr { grid-template-columns: minmax(0, 1fr) 92px; }
  .op-win { padding: 12px 10px; }
  .op-thumbs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 330px) { .op-pkgs.two, .op-wins { grid-template-columns: 1fr; } .op-addr { grid-template-columns: 1fr; } }
