:root {
  --blue: #1f5fb2;
  --blue-dark: #184c8f;
  --navy: #15263b;
  --ink: #2d3b48;
  --muted: #69798a;
  --line: #dfe5ec;
  --soft: #f4f7fa;
  --error: #b42318;
  --success: #087f5b;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; background: #f5f7f9; }
body {
  margin: 0;
  color: var(--ink);
  background: #f5f7f9;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.96);
  box-shadow: 0 1px 4px rgba(21,38,59,.08);
  backdrop-filter: blur(12px);
}
.header-inner {
  width: min(100% - 40px, 680px);
  min-height: 70px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: inline-flex; align-items: center; }
.brand img { width: auto; height: 43px; display: block; }
.help-link {
  color: #3c4ed4;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-decoration: none;
}

.page-shell {
  width: min(100% - 32px, 680px);
  margin: 24px auto 0;
}
.facility-card,
.checkout-card {
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 12px 34px rgba(21,38,59,.07);
}
.facility-card {
  padding: 20px 22px;
  border-radius: 12px 12px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.facility-card h1 { margin: 0; color: var(--navy); font-size: 25px; line-height: 1.1; }
.facility-card p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.facility-tags { display: flex; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.facility-tags span {
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef3fa;
  color: var(--blue-dark);
  font-size: 11px;
  font-weight: 700;
}

.checkout-card {
  margin-top: -1px;
  padding: 24px;
  border-radius: 0 0 12px 12px;
}
.card-heading,
.payment-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.step-label {
  margin: 0 0 3px;
  color: var(--blue);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.checkout-card h2 { margin: 0; color: var(--navy); font-size: 22px; line-height: 1.22; }
.secure-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--success);
  font-size: 12px;
  font-weight: 700;
}
.secure-label svg,
.trust-row svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.duration-chooser {
  min-width: 0;
  margin: 22px 0 0;
  padding: 0;
  border: 0;
}
.duration-chooser legend {
  margin: 0 0 9px;
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
}
.duration-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}
.duration-option {
  min-width: 0;
  min-height: 68px;
  padding: 10px 11px;
  border: 1px solid #cbd4de;
  border-radius: 9px;
  background: #fff;
  color: var(--navy);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 5px;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.duration-option:hover { border-color: #8ea9c8; }
.duration-option:focus-visible {
  outline: 0;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(31,95,178,.13);
}
.duration-option.selected {
  border-color: var(--blue);
  background: #eef4fb;
  box-shadow: inset 0 0 0 1px var(--blue);
}
.duration-option span { display: flex; flex-direction: column; }
.duration-option strong { font-size: 14px; line-height: 1.2; }
.duration-option small { margin-top: 2px; color: var(--muted); font-size: 11px; }

.order-summary {
  margin: 22px 0;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 13px 20px;
  font-size: 14px;
}
.order-summary > div { display: grid; }
.order-summary span { color: var(--navy); font-weight: 700; }
.order-summary small { color: var(--muted); font-size: 12px; }
.order-summary strong { align-self: center; color: var(--navy); font-size: 14px; }
.order-total-label,
.order-total {
  margin-top: 1px;
  padding-top: 14px;
  border-top: 1px solid #cfd8e2;
  color: var(--navy) !important;
  font-size: 17px !important;
  font-weight: 800;
}

.field { margin: 0 0 18px; }
.field label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 0 7px;
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
}
.field label > span:not(.optional) { color: var(--error); }
.field .optional { color: var(--muted); font-size: 11px; font-weight: 500; }
.field input,
.field select {
  width: 100%;
  height: 49px;
  padding: 0 13px;
  border: 1px solid #cbd4de;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.field input { text-transform: uppercase; }
.field input:focus,
.field select:focus {
  outline: 0;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(31,95,178,.13);
}
.field input[aria-invalid="true"] { border-color: var(--error); box-shadow: 0 0 0 3px rgba(180,35,24,.1); }
.field small { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }
.field-error { margin: 6px 0 0; color: var(--error); font-size: 12px; font-weight: 600; }

.primary-button {
  width: 100%;
  min-height: 54px;
  padding: 13px 16px;
  border: 0;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: background .16s ease, transform .16s ease, opacity .16s ease;
}
.primary-button:hover { background: var(--blue-dark); }
.primary-button:active { transform: translateY(1px); }
.primary-button:disabled { cursor: wait; opacity: .58; }
.primary-button strong { font-size: 16px; }

.payment-step {
  margin-top: 4px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.checkout-card.showing-payment > .card-heading,
.checkout-card.showing-payment > .duration-chooser,
.checkout-card.showing-payment > .order-summary,
.checkout-card.showing-payment > #parkingForm {
  display: none;
}
.checkout-card.showing-payment .payment-step {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.text-button {
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.reservation-chip {
  margin: 15px 0 20px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #eef3fa;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}
.reservation-chip span + span::before { content: "·"; margin-right: 7px; color: #8194aa; }
.reservation-chip span:empty { display: none; }
.reservation-chip span:empty::before { display: none; }

.payment-summary {
  margin: 0 0 22px;
  border-top: 6px solid #aeb2b8;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.payment-summary > div {
  min-height: 38px;
  padding: 8px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--navy);
  font-size: 14px;
}
.payment-summary > div strong { font-size: 14px; }
.payment-summary-total {
  margin-top: 8px;
  padding: 14px 4px !important;
  border-top: 1px solid var(--line);
  background: var(--soft);
  font-size: 16px !important;
  font-weight: 800;
}
.payment-summary-total strong { font-size: 17px !important; }
.fee-help {
  width: 16px;
  height: 16px;
  margin-left: 4px;
  border: 1px solid #7b8794;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  color: #566575;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.payment-loading {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #d7dee7;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.express-wrap {
  margin-bottom: 20px;
  padding: 18px;
  border: 1px solid #b7bec7;
  background: #fff;
}
.wallet-label {
  margin: 0 0 12px;
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}
.card-choice {
  margin-top: 16px;
  text-align: center;
}
.card-choice p {
  margin: 0 0 16px;
  color: var(--navy);
  font-size: 14px;
}
.card-choice small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
}
.credit-card-button {
  width: 100%;
  min-height: 50px;
  padding: 12px 18px;
  border: 0;
  border-radius: 5px;
  background: #4f57c9;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(32, 38, 117, .18);
}
.credit-card-button:hover { background: #4149b3; }
.credit-card-button:focus-visible { outline: 3px solid rgba(79, 87, 201, .25); outline-offset: 2px; }
.payment-details {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-10px);
  scroll-margin-top: 84px;
  transition: max-height .55s ease, opacity .28s ease, transform .38s ease;
}
.payment-details.is-open {
  max-height: 2600px;
  opacity: 1;
  transform: translateY(0);
}
.divider {
  margin: 20px 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  color: #7c8997;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .07em;
}
.divider::before,
.divider::after { content: ""; height: 1px; background: var(--line); }
.stripe-section { margin-top: 19px; }
.stripe-section h3 { margin: 0 0 10px; color: var(--navy); font-size: 14px; }
.payment-message {
  margin: 16px 0 0;
  padding: 11px 12px;
  border: 1px solid #f2c7c2;
  border-radius: 8px;
  background: #fef3f2;
  color: var(--error);
  font-size: 13px;
}
.pay-button { margin-top: 20px; }

.trust-row {
  margin-top: 20px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}
.legal-copy { margin: 13px auto 0; color: var(--muted); font-size: 11px; line-height: 1.55; text-align: center; }
.completion-card {
  margin-top: 28px;
  border-radius: 12px;
  text-align: center;
}
.completion-card h1 { margin: 6px 0 9px; color: var(--navy); font-size: 27px; line-height: 1.18; }
.completion-card > div > p:not(.step-label) { margin: 0 auto; max-width: 470px; color: var(--muted); font-size: 14px; }
.completion-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 15px;
  border-radius: 50%;
  background: #e7f7f0;
  color: var(--success);
  display: grid;
  place-items: center;
  font-size: 27px;
  font-weight: 800;
}
.confirmation-details {
  margin: 24px 0 0;
  border-top: 1px solid var(--line);
  text-align: left;
}
.confirmation-details div {
  padding: 13px 2px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 16px;
}
.confirmation-details dt { color: var(--muted); font-size: 12px; }
.confirmation-details dd { margin: 0; color: var(--navy); font-size: 13px; font-weight: 700; }
.completion-link { margin-top: 22px; color: #fff; text-decoration: none; justify-content: center; }

@media (max-width: 560px) {
  .header-inner { width: min(100% - 30px, 680px); min-height: 66px; }
  .brand img { height: 38px; }
  .page-shell { width: min(100% - 20px, 680px); margin-top: 12px; }
  .facility-card { padding: 17px 18px; border-radius: 10px 10px 0 0; align-items: flex-start; }
  .facility-card h1 { font-size: 22px; }
  .facility-tags { max-width: 180px; gap: 5px; }
  .facility-tags span { padding: 5px 8px; font-size: 10px; }
  .checkout-card { padding: 20px 18px; border-radius: 0 0 10px 10px; }
  .checkout-card h2 { font-size: 20px; }
  .secure-label { margin-top: 2px; }
  .duration-options { gap: 6px; }
  .duration-option { min-height: 64px; padding: 9px 8px; }
  .duration-option strong { font-size: 13px; }
  .order-summary { margin: 19px 0; padding: 15px; }
  .primary-button { font-size: 14px; }
  .trust-row { align-items: flex-start; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
