/* Mi cuenta → «Nuevo pedido»: the calculator in three steps with a fixed bar at the bottom. */
.pb-page { padding-bottom: calc(6.5rem + env(safe-area-inset-bottom)); background: #f5f8fb; }
.pb-top { max-width: 1220px; margin: auto; padding: 1.25rem 24px 0; }
.pb-back {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 44px;
  padding: .4rem 1rem .4rem .7rem;
  background: #fff;
  border: 1px solid var(--brand-border-light);
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: .9375rem;
  color: var(--brand-ink);
  text-decoration: none;
}
.pb-back:hover { border-color: rgba(0,191,255,.6); }
.pb-back svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pb-top [hidden] { display: none !important; }
.pb-steps { margin-top: 1.25rem; }
.pb-steps__label { margin: 0; font: 700 clamp(1.25rem, 4vw, 1.625rem)/1.2 Outfit, sans-serif; color: var(--brand-ink); }
.pb-steps__label:focus { outline: none; }
.pb-steps__bar { display: flex; gap: .4rem; max-width: 26rem; margin: .75rem 0 0; padding: 0; list-style: none; }
.pb-steps__bar li { flex: 1; height: 6px; border-radius: var(--radius-pill); background: #dbe6ee; transition: background 200ms; }
.pb-steps[data-step="1"] li:nth-child(-n+1),
.pb-steps[data-step="2"] li:nth-child(-n+2),
.pb-steps[data-step="3"] li { background: var(--brand-primary); }
.pb-rebook {
  margin: 1rem 0 0;
  padding: .8rem 1rem;
  border-radius: 1rem;
  background: var(--brand-primary-soft);
  color: #00587a;
  font-weight: 600;
}

/* The calculator: only what the current step needs. */
#calc3[data-portal-booking] .wrap { padding-top: 1rem; }
#calc3[data-portal-booking] :is(.intro, #stepbar, #stepbar-sentinel, #leadform, #leadnote, #back, #bookcta, #location-line),
#mobilebar { display: none !important; }
/* The calculator's hints rise above the bar instead of covering it. */
body:has(#pb-bar:not([hidden])) :is(#calchint, .calchint) { bottom: calc(80px + env(safe-area-inset-bottom)) !important; }
/* «Revisa tu solicitud · Ver resumen» points at the summary, which the steps already show at the end. */
body:has(#pb-bar) .context-help { display: none !important; }
#calc3[data-wizard="2"] :is(#bookform, .book-summary),
#calc3[data-wizard="3"] #stage2 .catalog > :not(#bookform) { display: none !important; }
#calc3[data-wizard="2"] .booking-grid { grid-template-columns: minmax(0, 1fr); }
#calc3[data-wizard="2"]:not([data-zone="ready"]) :is(#dates, #no-dates, #more-dates, #slots, #stage2 .catalog > .as-h3) { display: none !important; }
#calc3[data-portal-booking] .pb-zone { display: grid; grid-template-columns: minmax(0, 22rem) auto; align-items: center; gap: .75rem; margin: 1rem 0 1.25rem; }
#calc3[data-portal-booking] .pb-zone .error { grid-column: 1 / -1; margin: 0; }
#calc3[data-portal-booking] .pb-zone .error:empty { display: none; }
#calc3[data-portal-booking] #stage2 .catalog > .as-h3 { margin-top: 1.5rem; }
#calc3[data-portal-booking] .pb-notes { display: grid; gap: .5rem; margin-top: .5rem; }
#calc3[data-portal-booking] .pb-notes > label { font-weight: 600; color: var(--brand-ink); }
@media (max-width: 600px) {
  .pb-top { padding-inline: 16px; }
  #calc3[data-portal-booking] .pb-zone { grid-template-columns: minmax(0, 1fr); }
  #calc3[data-portal-booking] .pb-zone .primary { justify-self: start; }
}

/* After booking: carry on in WhatsApp. */
#calc3 .final-actions a.pb-wa { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; background: #25d366; color: #fff; }
#calc3 .final-actions a.pb-wa:hover { background: #1eb956; }
#calc3 .final-actions a.pb-wa svg { width: 1.25rem; height: 1.25rem; flex: none; }

/* Brand buttons inside the calculator: blue with white text, the second one outlined in blue. */
#calc3[data-portal-booking] .secondary { border-color: rgba(0,191,255,.55); color: #007da9; font-weight: 600; }
#calc3[data-portal-booking] .secondary:hover { background: var(--brand-primary-soft); }

/* Fixed bar: what is chosen, back and next. */
.pb-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 55;
  padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.96);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--brand-border-light);
  box-shadow: 0 -6px 20px rgba(15,23,42,.06);
}
.pb-bar[hidden] { display: none; }
.pb-bar__inner { display: flex; align-items: center; gap: .75rem; max-width: 1172px; margin: auto; }
.pb-bar__sum { display: grid; gap: .1rem; flex: 1; min-width: 0; line-height: 1.25; }
.pb-bar__sum p { margin: 0; }
.pb-bar__items, .pb-bar__when { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .75rem; color: var(--brand-text-muted); }
.pb-bar__when { color: #007da9; font-weight: 600; }
.pb-bar__when::first-letter { text-transform: uppercase; }
.pb-bar__when[hidden], .pb-bar__price [hidden] { display: none; }
.pb-bar__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .4rem; }
.pb-bar__total { font: 700 1.25rem/1.2 Outfit, sans-serif; color: var(--brand-ink); }
.pb-bar__total:empty { display: none; }
.pb-bar__price s { font-size: .75rem; color: var(--brand-text-soft); }
.pb-bar__save { font-size: .75rem; font-weight: 700; color: #15803d; }
.pb-bar__back, .pb-bar__next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: .6rem 1.25rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  white-space: nowrap;
}
.pb-bar__back { gap: .25rem; padding-left: .9rem; background: #fff; border: 1.5px solid rgba(0,191,255,.55); color: #007da9; }
.pb-bar__back svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.pb-bar__back:hover { background: var(--brand-primary-soft); }
.pb-bar__next { min-width: 8.5rem; background: var(--brand-primary); color: #fff; box-shadow: var(--shadow-primary-sm); }
.pb-bar__next:hover { background: var(--brand-primary-dark); }
.pb-bar__next:disabled { opacity: .6; }
.pb-bar__back[hidden] { display: none; }
/* Phones: «Atrás» shrinks to its arrow so the summary keeps its room. */
@media (max-width: 600px) {
  .pb-bar__inner { gap: .5rem; }
  .pb-bar__back { width: 48px; padding: 0; }
  .pb-bar__back span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .pb-bar__next { min-width: 0; padding-inline: 1.1rem; }
}
