/* Booking form. Uses the theme's tokens when present, with fallbacks so the
   form stays usable with another theme. */
.apb {
  --apb-ink: var(--ink, #18191d);
  --apb-soft: var(--ink-muted, #5c5f67);
  --apb-line: var(--mist, #e2ded6);
  --apb-paper: var(--paper, #fcfbf8);
  --apb-tint: var(--pearl, #efece6);
  --apb-dark: var(--night-900, #111318);
  --apb-gold: var(--gold-deep, #80612a);
  --apb-ease: var(--ease-out, cubic-bezier(.16, 1, .3, 1));
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(1.25rem, 4vw, 3rem);
  border-radius: 28px;
  background: var(--apb-paper);
  border: 1px solid var(--apb-line);
  box-shadow: 0 30px 80px rgba(17, 19, 24, .12);
  color: var(--apb-ink);
  scroll-margin-top: calc(var(--header-h, 80px) + 16px);
}
.apb [hidden] { display: none !important; }
.apb-notice { margin: 0 0 1rem; padding: .9rem 1.1rem; border-radius: 12px; background: rgba(181, 18, 27, .06); border: 1px dashed rgba(181, 18, 27, .45); color: #6d0c11; font-size: .92rem; line-height: 1.55; }
.apb-note { margin: 0 0 1rem; color: var(--apb-soft); font-size: .92rem; }
.apb-steps { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; list-style: none; padding: 0; margin: 1.5rem 0 2rem; counter-reset: s; }
.apb-steps li { position: relative; display: grid; justify-items: center; gap: .4rem; font-size: .82rem; color: var(--apb-soft); text-align: center; }
.apb-steps li::before { content: ""; position: absolute; top: 17px; left: calc(-50% + 22px); right: calc(50% + 22px); height: 2px; background: var(--apb-line); }
.apb-steps li:first-child::before { display: none; }
.apb-steps li.done::before, .apb-steps li.active::before { background: linear-gradient(90deg, var(--silver-500, #858b94), var(--apb-dark)); }
.apb-steps li span { position: relative; z-index: 1; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--apb-line); background: #fff; font-weight: 600; transition: background .3s, color .3s, transform .3s var(--apb-ease); }
.apb-steps li.active { color: var(--apb-ink); font-weight: 600; }
.apb-steps li.active span { background: var(--apb-dark); border-color: var(--apb-dark); color: #fff; transform: scale(1.1); box-shadow: 0 0 0 5px rgba(17, 19, 24, .08); }
.apb-steps li.done span { background: var(--silver-button, #dfe3e7); color: var(--apb-dark); }
.apb fieldset { border: 0; padding: 0; margin: 0; min-width: 0; animation: apbIn .5s var(--apb-ease); }
@keyframes apbIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.apb legend { padding: 0; margin-bottom: 1.4rem; font-family: var(--font-serif, Georgia, serif); font-size: clamp(1.7rem, 1.3rem + 1.5vw, 2.3rem); font-weight: 600; line-height: 1.2; color: var(--apb-ink); outline: none; }
.apb-label { margin: 1.4rem 0 .7rem; font-size: .8rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--apb-gold); }
.apb-hint { color: var(--apb-soft); font-size: .93rem; }
.apb-categories { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.apb .apb-category { display: grid; grid-template-columns: 46px 1fr; column-gap: 1rem; align-items: start; text-align: left; padding: 1.1rem 1.2rem; border-radius: 18px; border: 1px solid var(--apb-line); background: #fff; color: var(--apb-ink); transition: border-color .25s, box-shadow .25s, transform .25s var(--apb-ease); }
.apb .apb-category:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(17, 19, 24, .08); }
.apb-category__icon { grid-row: span 2; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--apb-tint); }
.apb-category__icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.apb-category strong { font-size: 1.05rem; }
.apb-category span:not(.apb-category__icon) { font-size: .88rem; line-height: 1.45; color: var(--apb-soft); }
.apb .apb-category[aria-pressed="true"] { border-color: var(--apb-dark); box-shadow: 0 0 0 1px var(--apb-dark), 0 14px 30px rgba(17, 19, 24, .1); }
.apb .apb-category[aria-pressed="true"] .apb-category__icon { background: var(--apb-dark); color: #fff; }
.apb-guidance { margin-top: 1.2rem; padding: 1.1rem 1.2rem; border-radius: 14px; background: var(--apb-tint); }
.apb-contact-link { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.apb-services { display: grid; gap: .6rem; max-height: 420px; overflow: auto; padding: 2px; }
.apb .apb-service { position: relative; display: grid; margin: 0; gap: .15rem; padding: .95rem 1.1rem .95rem 3.1rem; border-radius: 14px; border: 1px solid var(--apb-line); background: #fff; cursor: pointer; transition: border-color .2s, box-shadow .2s, background .2s; }
.apb-service input { position: absolute; left: 1.1rem; top: 1.15rem; width: 20px; height: 20px; margin: 0; accent-color: var(--apb-dark); }
.apb-service__title { font-weight: 500; line-height: 1.35; }
.apb-service__meta { font-size: .88rem; color: var(--apb-soft); }
.apb-service:hover { border-color: var(--silver-500, #858b94); }
.apb-service:has(input:checked) { border-color: var(--apb-dark); background: #fbfbfc; box-shadow: 0 0 0 1px var(--apb-dark); }
.apb-service-empty { padding: 1rem; border-radius: 12px; background: var(--apb-tint); }
.apb-format-choice { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.apb-format-choice .apb-label { flex-basis: 100%; }
.apb-format-choice .apb-hint { flex-basis: 100%; margin: 0; }
.apb-pill { position: relative; cursor: pointer; }
.apb-pill input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.apb-pill span { display: inline-flex; align-items: center; min-height: 44px; padding: .5rem 1.2rem; border-radius: 999px; border: 1px solid var(--apb-line); background: #fff; transition: background .2s, color .2s, border-color .2s; }
.apb-pill input:checked + span { background: var(--apb-dark); border-color: var(--apb-dark); color: #fff; }
.apb-pill input:focus-visible + span { outline: 2px solid var(--gold, #c7a466); outline-offset: 3px; }
.apb-picker { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.apb-calendar { padding: 1.1rem; border-radius: 18px; border: 1px solid var(--apb-line); background: #fff; }
.apb-calendar__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .8rem; }
.apb-calendar__head strong { font-family: var(--font-serif, Georgia, serif); font-size: 1.35rem; text-transform: capitalize; }
.apb .apb-month-prev, .apb .apb-month-next { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--apb-line); background: #fff; font-size: 1.3rem; line-height: 1; color: var(--apb-ink); }
.apb .apb-month-prev:disabled, .apb .apb-month-next:disabled { opacity: .35; cursor: default; }
.apb-weekdays, .apb-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; text-align: center; }
.apb-weekdays span { font-size: .72rem; font-weight: 600; letter-spacing: .08em; color: var(--apb-soft); padding: .3rem 0; }
.apb-days.is-loading { opacity: .45; }
.apb .apb-day { aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; border: 1px solid transparent; background: transparent; color: #a3a7ad; font-size: .95rem; transition: background .2s, color .2s, transform .2s var(--apb-ease), border-color .2s; }
.apb .apb-day.is-open { color: var(--apb-ink); font-weight: 600; border-color: var(--silver-400, #a3a9b2); background: linear-gradient(180deg, #fff, #f1f3f5); }
.apb .apb-day.is-open:hover { transform: scale(1.08); border-color: var(--apb-dark); }
.apb .apb-day.is-today { box-shadow: inset 0 0 0 1px var(--gold, #c7a466); }
.apb .apb-day[aria-pressed="true"] { background: var(--apb-dark); color: #fff; border-color: var(--apb-dark); }
.apb .apb-day:disabled { cursor: default; text-decoration: none; }
.apb .apb-day--blank { visibility: hidden; }
.apb-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: .5rem; }
.apb .apb-slot { min-height: 44px; border-radius: 12px; border: 1px solid var(--apb-line); background: #fff; color: var(--apb-ink); font-weight: 500; transition: background .2s, color .2s, border-color .2s, transform .2s var(--apb-ease); animation: apbIn .35s var(--apb-ease) both; }
.apb .apb-slot:hover { border-color: var(--apb-dark); transform: translateY(-2px); }
.apb .apb-slot[aria-checked="true"] { background: var(--apb-dark); color: #fff; border-color: var(--apb-dark); }
.apb-slots-message { margin-top: .9rem; color: var(--apb-soft); font-size: .92rem; text-transform: none; }
.apb-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.apb-grid label:first-child { grid-column: 1 / -1; }
.apb label { display: block; margin: 0 0 1rem; font-size: .92rem; font-weight: 500; color: var(--apb-ink); }
.apb input:not([type=checkbox]):not([type=radio]) { display: block; width: 100%; min-height: 52px; margin-top: .4rem; padding: .7rem 1rem; border: 1px solid var(--apb-line); border-radius: 12px; background: #fff; font: inherit; color: var(--apb-ink); transition: border-color .2s, box-shadow .2s; }
.apb input:not([type=checkbox]):not([type=radio]):focus { outline: none; border-color: var(--silver-500, #858b94); box-shadow: 0 0 0 4px rgba(133, 139, 148, .18); }
.apb-policy { padding: 1rem 1.1rem; border-radius: 12px; background: var(--apb-tint); font-size: .92rem; line-height: 1.6; }
.apb .apb-check { display: flex; gap: .75rem; align-items: flex-start; font-weight: 400; font-size: .94rem; line-height: 1.55; }
.apb-check input { flex-shrink: 0; width: 20px; height: 20px; margin-top: .15rem; accent-color: var(--apb-dark); }
.apb-check a { text-decoration: underline; text-underline-offset: 3px; }
.apb-summary { margin-bottom: 1.2rem; }
.apb-summary dl { margin: 0; border-radius: 16px; border: 1px solid var(--apb-line); background: #fff; overflow: hidden; }
.apb-summary dl div { display: flex; justify-content: space-between; gap: 1rem; padding: .75rem 1.1rem; border-top: 1px solid var(--apb-line); }
.apb-summary dl div:first-child { border-top: 0; }
.apb-summary dl div:nth-last-child(2) { background: var(--apb-tint); font-weight: 600; }
.apb-summary dt { color: var(--apb-soft); }
.apb-summary dd { margin: 0; text-align: right; font-weight: 500; }
.apb .apb-pay { display: inline-flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .9rem; width: 100%; min-height: 58px; margin-top: .6rem; padding: .8rem 1.6rem; border-radius: 999px; border: 0; background: var(--apb-dark); color: #fff; font-size: 1.02rem; font-weight: 600; letter-spacing: .03em; box-shadow: 0 16px 34px rgba(17, 19, 24, .28); transition: transform .2s var(--apb-ease), box-shadow .2s; }
.apb .apb-pay:hover { transform: translateY(-2px); box-shadow: 0 20px 40px rgba(17, 19, 24, .34); }
.apb-card-brands { display: inline-flex; gap: 6px; align-items: center; }
.apb-card-brands svg { display: block; width: 42px; height: 26px; }
.apb-error { min-height: 1.4em; margin: 1rem 0 0; color: #9e1b20; font-weight: 500; }
.apb-error:empty { min-height: 0; margin: 0; }
.apb-controls { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.6rem; padding-top: 1.4rem; border-top: 1px solid var(--apb-line); }
.apb .apb-next { margin-left: auto; min-height: 52px; padding: .8rem 1.8rem; border-radius: 999px; border: 0; background: var(--apb-dark); color: #fff; font-weight: 600; letter-spacing: .03em; transition: transform .2s var(--apb-ease), box-shadow .2s; box-shadow: 0 12px 26px rgba(17, 19, 24, .22); }
.apb .apb-next:hover { transform: translateY(-2px); }
.apb .apb-back { min-height: 52px; padding: .8rem 1.4rem; border-radius: 999px; border: 1px solid var(--apb-line); background: transparent; color: var(--apb-ink); }
.apb button:disabled { cursor: wait; }
.apb.is-busy { cursor: progress; }
.apb :focus-visible { outline: 2px solid var(--gold, #c7a466); outline-offset: 3px; }
.apb-result { text-align: center; padding: 1.5rem 0 .5rem; animation: apbIn .6s var(--apb-ease); }
.apb-result__mark svg { width: 84px; height: 84px; margin: 0 auto 1rem; fill: none; stroke: var(--apb-dark); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.apb-result h2 { font-family: var(--font-serif, Georgia, serif); font-size: 2rem; margin-bottom: .6rem; }
.apb-confirmation { font-weight: 500; }
@media (max-width: 760px) {
  .apb-categories, .apb-picker, .apb-grid { grid-template-columns: 1fr; }
  .apb-steps li { font-size: .7rem; }
  .apb-controls { flex-wrap: wrap; }
  .apb .apb-next { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .apb *, .apb fieldset { animation: none !important; transition: none !important; }
}
