/* ═══════════════════════════════════════════════════════════════════════
   Booking Summary (step 4) — a focused "review & confirm" layout.
   Everything here is scoped to #axwiz-panel-4 and built only from the
   theme's own colours (--axwiz-*), so text stays readable on light AND
   dark themes (the older rules used fixed near-white text).
   ═══════════════════════════════════════════════════════════════════════ */

#axwiz-root #axwiz-panel-4 {
  --sx-ink:    var(--axwiz-text, #111827);
  --sx-muted:  color-mix(in srgb, var(--axwiz-text, #111827) 58%, transparent);
  --sx-line:   var(--axwiz-border, rgba(127,127,127,.22));
  --sx-card:   var(--axwiz-card, var(--axwiz-surface, #ffffff));
  --sx-soft:   color-mix(in srgb, var(--axwiz-primary, #635BFF) 7%, var(--sx-card));
  --sx-accent: var(--axwiz-primary, #635BFF);
  --sx-r:      16px;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

/* Heading */
#axwiz-root #axwiz-panel-4 .axwiz-panel-title {
  font-size: 26px; font-weight: 800; letter-spacing: -.01em; color: var(--sx-ink);
  border: 0 !important; padding-bottom: 0; margin-bottom: 4px;
}
#axwiz-root #axwiz-panel-4 .axwiz-panel-title::after {
  content: "Check the details below, then confirm your booking.";
  display: block; font-size: 14px; font-weight: 500; letter-spacing: 0; color: var(--sx-muted); margin-top: 6px;
}

/* ── Summary card ─────────────────────────────────────────── */
#axwiz-root #axwiz-panel-4 .axwiz-summary-box {
  background: var(--sx-card) !important;
  border: 1px solid var(--sx-line) !important;
  border-radius: var(--sx-r) !important;
  box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 12px 32px -12px rgba(16,24,40,.14) !important;
  padding: 0 !important; overflow: hidden; margin-top: 18px;
  display: flex !important; flex-wrap: wrap; align-items: stretch;
}
#axwiz-root #axwiz-panel-4 .axwiz-summary-box > * { flex: 0 0 100%; max-width: 100%; box-sizing: border-box; }
/* rows the booking hides (no tax, no promo, no add-ons…) stay hidden */
#axwiz-root #axwiz-panel-4 .axwiz-summary-box [style*="display:none"], #axwiz-root #axwiz-panel-4 .axwiz-summary-box [style*="display: none"] { display: none !important; }

/* Service header band */
#axwiz-root #axwiz-panel-4 .axwiz-summary-service {
  display: flex !important; flex-direction: row !important; align-items: center !important; justify-content: flex-start !important;
  gap: 16px; padding: 20px 22px !important; margin: 0 !important; border: 0 !important;
  background: var(--sx-soft) !important; text-align: left !important;
}
#axwiz-root #axwiz-panel-4 .axwiz-summary-service > div:last-child { text-align: left !important; flex: 1; min-width: 0; }
#axwiz-root #axwiz-panel-4 .axwiz-sum-icon {
  width: 52px !important; height: 52px !important; min-width: 52px; border-radius: 14px !important;
  display: flex !important; align-items: center; justify-content: center; font-size: 22px !important;
  box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--sx-accent) 60%, transparent);
}
#axwiz-root #axwiz-panel-4 .axwiz-sum-label {
  font-size: 11px !important; font-weight: 700 !important; letter-spacing: .08em; text-transform: uppercase; color: var(--sx-muted) !important; margin-bottom: 2px;
}
#axwiz-root #axwiz-panel-4 .axwiz-sum-val { font-size: 20px !important; font-weight: 800 !important; color: var(--sx-ink) !important; line-height: 1.25; overflow-wrap: anywhere; }
#axwiz-root #axwiz-panel-4 .axwiz-summary-divider { display: none !important; }

/* Detail rows: two columns on wide screens — label above value, like a ticket */
#axwiz-root #axwiz-panel-4 .axwiz-summary-box > .axwiz-summary-row:not(.axwiz-summary-service) {
  display: flex; flex-direction: column !important; align-items: flex-start !important; justify-content: flex-start !important;
  gap: 4px; flex: 0 0 50% !important; max-width: 50% !important; box-sizing: border-box;
  padding: 14px 22px !important; margin: 0 !important; border: 0 !important; border-top: 1px solid var(--sx-line) !important;
  background: transparent !important;
}
#axwiz-root #axwiz-panel-4 .axwiz-summary-row > span {
  font-size: 12px !important; font-weight: 600 !important; color: var(--sx-muted) !important; text-transform: uppercase; letter-spacing: .05em;
  display: inline-flex; align-items: center; gap: 7px;
}
#axwiz-root #axwiz-panel-4 .axwiz-summary-row > span i { color: var(--sx-accent) !important; width: 14px; text-align: center; opacity: .9; }
#axwiz-root #axwiz-panel-4 .axwiz-summary-row > strong {
  font-size: 15px !important; font-weight: 700 !important; color: var(--sx-ink) !important; text-align: left !important; overflow-wrap: anywhere; max-width: 100%;
}
#axwiz-root #axwiz-panel-4 #axwiz-sum-lane { color: var(--sx-accent) !important; }

/* ── Charges ──────────────────────────────────────────────── */
#axwiz-root #axwiz-panel-4 .sp-section-divider {
  display: flex; align-items: center; gap: 10px; margin: 0 !important; padding: 16px 22px 6px !important;
  border-top: 1px solid var(--sx-line); background: transparent !important;
}
#axwiz-root #axwiz-panel-4 .sp-section-divider span,
#axwiz-root #axwiz-panel-4 .sp-section-divider {
  font-size: 11px !important; font-weight: 800 !important; letter-spacing: .1em; text-transform: uppercase; color: var(--sx-muted) !important;
}
#axwiz-root #axwiz-panel-4 .sp-section-divider::before, #axwiz-root #axwiz-panel-4 .sp-section-divider::after { display: none !important; }
#axwiz-root #axwiz-panel-4 .sp-row {
  display: flex; justify-content: space-between !important; align-items: baseline !important; gap: 16px;
  padding: 8px 22px !important; margin: 0 !important; border: 0 !important; background: transparent !important;
}
#axwiz-root #axwiz-panel-4 .sp-lbl, #axwiz-root #axwiz-panel-4 .sp-lbl-text {
  background: none !important; padding: 0 !important; border-radius: 0 !important; box-shadow: none !important;
  font-size: 14px !important; font-weight: 500 !important; color: var(--sx-ink) !important; text-align: left !important;
}
#axwiz-root #axwiz-panel-4 .sp-lbl-sub { font-size: 12px !important; color: var(--sx-muted) !important; margin-left: 6px; }
#axwiz-root #axwiz-panel-4 .sp-val { font-size: 14px !important; font-weight: 600 !important; color: var(--sx-ink) !important; white-space: nowrap; font-variant-numeric: tabular-nums; }
#axwiz-root #axwiz-panel-4 .sp-val--discount { color: #059669 !important; }
#axwiz-root #axwiz-panel-4 .sp-val--tip, #axwiz-root #axwiz-panel-4 .sp-lbl--tip .sp-lbl-text { color: var(--sx-ink) !important; }

/* Total */
#axwiz-root #axwiz-panel-4 .sp-row--total {
  align-items: center !important; margin-top: 10px !important; padding: 18px 22px !important;
  background: var(--sx-soft) !important; border-top: 1px solid var(--sx-line) !important;
}
#axwiz-root #axwiz-panel-4 .sp-total-lbl {
  font-size: 13px !important; font-weight: 800 !important; letter-spacing: .1em; text-transform: uppercase; color: var(--sx-ink) !important;
}
#axwiz-root #axwiz-panel-4 .sp-total-val {
  font-size: 30px !important; font-weight: 900 !important; letter-spacing: -.02em; color: var(--sx-accent) !important; font-variant-numeric: tabular-nums;
}

/* ── Tip ─────────────────────────────────────────────────── */
#axwiz-root #axwiz-panel-4 .axwiz-tip-section {
  margin-top: 16px; padding: 18px 22px !important; background: var(--sx-card) !important;
  border: 1px solid var(--sx-line) !important; border-radius: var(--sx-r) !important;
}
#axwiz-root #axwiz-panel-4 .axwiz-tip-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
#axwiz-root #axwiz-panel-4 .axwiz-tip-header > span:first-child { font-size: 15px; font-weight: 700; color: var(--sx-ink); }
#axwiz-root #axwiz-panel-4 .axwiz-tip-subtitle { font-size: 12px; color: var(--sx-muted) !important; }
#axwiz-root #axwiz-panel-4 .axwiz-tip-btns { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 8px !important; }
#axwiz-root #axwiz-panel-4 .axwiz-tip-btn {
  padding: 11px 8px !important; border-radius: 12px !important; border: 1.5px solid var(--sx-line) !important;
  background: var(--sx-card) !important; color: var(--sx-ink) !important; font-weight: 700 !important; font-size: 14px !important;
  transition: border-color .15s, background .15s, color .15s, transform .1s; cursor: pointer;
}
#axwiz-root #axwiz-panel-4 .axwiz-tip-btn:hover { border-color: var(--sx-accent) !important; }
#axwiz-root #axwiz-panel-4 .axwiz-tip-btn:active { transform: scale(.98); }
#axwiz-root #axwiz-panel-4 .axwiz-tip-btn--active { background: var(--sx-accent) !important; border-color: var(--sx-accent) !important; color: #fff !important; }
#axwiz-root #axwiz-panel-4 .axwiz-tip-summary {
  margin-top: 12px; padding: 10px 14px !important; border-radius: 10px !important; font-size: 13px;
  background: var(--sx-soft) !important; color: var(--sx-ink) !important; border: 0 !important;
}

/* ── Payment ─────────────────────────────────────────────── */
#axwiz-root #axwiz-panel-4 .axwiz-payment-box {
  margin-top: 16px; background: var(--sx-card) !important; border: 1px solid var(--sx-line) !important;
  border-radius: var(--sx-r) !important; overflow: hidden; color: var(--sx-ink) !important;
}
#axwiz-root #axwiz-panel-4 .axwiz-payment-header {
  background: transparent !important; border-bottom: 1px solid var(--sx-line) !important; padding: 14px 22px !important;
  color: var(--sx-ink) !important; font-weight: 700;
}
#axwiz-root #axwiz-panel-4 .axwiz-payment-header * { color: inherit; }
#axwiz-root #axwiz-panel-4 .axwiz-payment-header .fa-lock { color: #059669 !important; }
#axwiz-root #axwiz-panel-4 .axwiz-payment-box p,
#axwiz-root #axwiz-panel-4 .axwiz-payment-box small,
#axwiz-root #axwiz-panel-4 .axwiz-payment-box span:not(.axwiz-pay-badge) { color: var(--sx-ink); }

/* ── Phones: one column, everything still fully on screen ── */
@media (max-width: 600px) {
  #axwiz-root #axwiz-panel-4 .axwiz-panel-title { font-size: 22px; }
  #axwiz-root #axwiz-panel-4 .axwiz-summary-box > .axwiz-summary-row:not(.axwiz-summary-service) { flex-basis: 100% !important; max-width: 100% !important; padding: 12px 18px !important; }
  #axwiz-root #axwiz-panel-4 .axwiz-summary-service, #axwiz-root #axwiz-panel-4 .sp-row, #axwiz-root #axwiz-panel-4 .sp-section-divider { padding-left: 18px !important; padding-right: 18px !important; }
  #axwiz-root #axwiz-panel-4 .sp-total-val { font-size: 26px !important; }
  #axwiz-root #axwiz-panel-4 .axwiz-tip-btns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ── Cancellation policy + Terms, shown in full before payment ── */
#axwiz-root #axwiz-panel-4 .axwiz-policies { margin-top: 22px; }
#axwiz-root #axwiz-panel-4 .axwiz-policy-title {
  font-size: 18px; font-weight: 700; color: var(--sx-accent); margin: 18px 0 10px; padding-bottom: 8px;
  border-bottom: 1px solid var(--sx-line); letter-spacing: -.005em;
}
#axwiz-root #axwiz-panel-4 .axwiz-policy-box {
  background: var(--sx-card); border: 1px solid var(--sx-line); border-radius: 10px; padding: 14px 16px;
  font-size: 14px; line-height: 1.6; color: var(--sx-ink); max-height: 190px; overflow-y: auto; overflow-wrap: anywhere;
}
#axwiz-root #axwiz-panel-4 .axwiz-policy-box p { margin: 0 0 8px; }
#axwiz-root #axwiz-panel-4 .axwiz-policy-box p:last-child { margin-bottom: 0; }
#axwiz-root #axwiz-panel-4 .axwiz-policy-box:focus-visible { outline: 2px solid var(--sx-accent); outline-offset: 2px; }
#axwiz-root #axwiz-panel-4 .axwiz-terms-wrap { margin-top: 20px; text-align: left; }
#axwiz-root #axwiz-panel-4 .axwiz-terms-label { font-weight: 600; color: var(--sx-ink); font-size: 15px; }
#axwiz-root #axwiz-panel-4 .axwiz-terms-checkbox-box { border: 2px solid color-mix(in srgb, var(--sx-ink) 45%, transparent) !important; background: var(--sx-card) !important; width: 20px; height: 20px; border-radius: 5px; }
#axwiz-root #axwiz-panel-4 .axwiz-terms-err { text-align: var(--axwiz-terms-align, center); }
#axwiz-root #axwiz-panel-4 .axwiz-terms-err { display: none; color: #dc2626; font-size: 14px; font-weight: 600; margin: 6px 0 0 2px; }
#axwiz-root #axwiz-panel-4 .axwiz-terms-err.on { display: block; }
#axwiz-root #axwiz-panel-4 .axwiz-terms-shake { animation: axwizShake .4s ease; }
@keyframes axwizShake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) { #axwiz-root #axwiz-panel-4 .axwiz-terms-shake { animation: none; } }
/* not agreed yet: the pay button looks inactive (it still explains why when tapped) */
#axwiz-root .axwiz-btn-submit.axwiz-btn-waiting { opacity: .55; filter: saturate(.6); box-shadow: none !important; }


/* 3.36.5: card fields are white with black text in every theme */
#axwiz-root #axwiz-panel-4 #sq-card-number, #axwiz-root #axwiz-panel-4 .sq-card-wrap, #axwiz-root #axwiz-panel-4 .sq-field { background: #ffffff !important; color: #000000 !important; }

/* 3.36.8: Square's card iframe must render in LIGHT colour-scheme, otherwise its
   messages ("Enter a valid card number.") inherit the dark theme's white text */
#axwiz-root #sq-card-number, #axwiz-root #sq-card-number iframe, .sq-host, .sq-host iframe { color-scheme: light !important; }

/* 3.36.9: original card badges, only let the Amex glyph overflow its box instead of clipping */
#axwiz-root #axwiz-panel-4 .axwiz-pay-badge { overflow: visible; }

/* 3.36.10: brand badges = white chip + brand-coloured logo (same look as 3.36.4, Amex not clipped) */
#axwiz-root #axwiz-panel-4 .axwiz-pay-badge { display: inline-flex !important; align-items: center; justify-content: center; background: #ffffff !important; border: 1px solid rgba(0,0,0,.12); border-radius: 5px; padding: 3px 7px !important; line-height: 1.15 !important; opacity: 1 !important; }
#axwiz-root #axwiz-panel-4 .axwiz-pay-badge i { font-size: 22px !important; line-height: 1.15 !important; opacity: 1 !important; display: inline-block; }
#axwiz-root #axwiz-panel-4 .axwiz-pay-badge .fa-cc-visa { color: #1a1f71 !important; }
#axwiz-root #axwiz-panel-4 .axwiz-pay-badge .fa-cc-mastercard { color: #eb001b !important; }
#axwiz-root #axwiz-panel-4 .axwiz-pay-badge .fa-cc-amex { color: #2e77bc !important; }
#axwiz-root #axwiz-panel-4 .axwiz-pay-badge .fa-cc-discover { color: #ff6000 !important; }
/* Card error: black text on its own white box, readable on any theme */
#sq-field-msg { margin: 8px 0 0 !important; padding: 9px 12px !important; background: #ffffff !important; color: #000000 !important; border: 1px solid #fca5a5 !important; border-left: 4px solid #dc2626 !important; border-radius: 6px !important; font-size: 13.5px !important; font-weight: 600 !important; }
