/* Passes checkout. Unlayered so these rules win over styles.css. */

.pass-hero {
  justify-items: center;
  margin-top: 0.2rem;
  padding: 0.35rem 0 0.2rem;
  background: transparent;
  color: var(--ink);
}

.pass-hero img {
  width: min(100%, 32rem);
  height: auto;
  filter: drop-shadow(0 12px 22px rgb(28 20 15 / 0.22));
}

.pass-hero .lede,
.pass-hero p {
  justify-self: stretch;
  width: 100%;
  color: var(--ink);
}

.pass-hero .ticket-caption {
  color: var(--rust-hot);
  text-align: center;
}

.pass-hero .button.secondary {
  color: var(--ink);
}

dialog.pay-dialog {
  width: min(62rem, calc(100vw - 1rem));
  max-height: min(94dvh, 48rem);
  padding: 0.85rem 1rem 1rem 2.45rem;
  overscroll-behavior: contain;
}

dialog.pay-dialog h2 {
  font-size: clamp(1.45rem, 2.6vw, 2rem);
}

dialog.pay-dialog .checkout {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.35rem;
}

dialog.pay-dialog .show-sheet {
  padding: 0.9rem 0.95rem 1rem 1rem;
  background:
    linear-gradient(var(--header), var(--header)) 0 0 / 0.4rem 100% no-repeat,
    var(--paper-2);
  border: 1px solid var(--ink);
}

dialog.pay-dialog .show-when {
  margin: 0 0 0.35rem;
  color: var(--rust-hot);
  font-family: var(--serif);
  font-size: 1.28rem;
  font-weight: 560;
  letter-spacing: -0.03em;
}

dialog.pay-dialog .show-where {
  margin: 0 0 0.7rem;
  font-weight: 700;
}

dialog.pay-dialog .show-where span {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-weight: 400;
}

dialog.pay-dialog .show-bill,
dialog.pay-dialog .show-extra,
dialog.pay-dialog .fare-note {
  margin: 0 0 0.7rem;
}

dialog.pay-dialog .fare-note {
  color: var(--muted);
  font-size: 0.95rem;
}

dialog.pay-dialog .show-sheet a {
  display: inline;
  min-height: 0;
}

dialog.pay-dialog .fare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin: 0 0 0.75rem;
}

dialog.pay-dialog .fare div {
  padding: 0.55rem 0.65rem 0.6rem;
  background: var(--paper);
  border: 1px solid var(--rule);
}

dialog.pay-dialog .fare dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

dialog.pay-dialog .fare dd {
  margin: 0.12rem 0 0;
  font-family: var(--serif);
  font-size: 1.55rem;
  letter-spacing: -0.03em;
}

dialog.pay-dialog form,
dialog.pay-dialog .pay-panel {
  position: relative;
  display: grid;
  gap: 0.65rem;
  align-content: start;
  margin: 0;
  padding: 0.85rem;
  background: var(--paper-2);
  border: 1px solid var(--rule);
}

dialog.pay-dialog .field {
  display: grid;
  gap: 0.22rem;
}

dialog.pay-dialog label {
  font-weight: 700;
}

dialog.pay-dialog .hint,
dialog.pay-dialog .stub-note,
dialog.pay-dialog .pay-result {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 400;
}

dialog.pay-dialog input {
  min-height: 3rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid #c4b8a8;
  border-radius: 0.45rem;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  font-weight: 400;
}

dialog.pay-dialog .checkout > *,
dialog.pay-dialog .pay-panel,
dialog.pay-dialog .field,
dialog.pay-dialog .card-row,
dialog.pay-dialog fieldset {
  min-width: 0;
}

dialog.pay-dialog fieldset {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding: 0.75rem;
  border: 1px solid var(--rule);
  border-radius: 0.45rem;
}

dialog.pay-dialog legend {
  padding-inline: 0.35rem;
  font-weight: 700;
}

dialog.pay-dialog .card-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

dialog.pay-dialog .wallets {
  display: grid;
  gap: 0.45rem;
}

dialog.pay-dialog .wallet {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  min-height: 3rem;
  border-radius: 0.35rem;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
}

dialog.pay-dialog .wallet.apple {
  border: 0;
  background: #000;
  color: #fff;
}

dialog.pay-dialog .wallet.google {
  border: 1px solid #747775;
  background: #fff;
  color: #3c4043;
}

dialog.pay-dialog .wallet:disabled,
dialog.pay-dialog button.button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

dialog.pay-dialog .wallet-mark {
  display: block;
  flex: 0 0 auto;
}

dialog.pay-dialog .pay-or {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0.1rem 0;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

dialog.pay-dialog .pay-or::before,
dialog.pay-dialog .pay-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}

dialog.pay-dialog .pay-total {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

dialog.pay-dialog .pay-actions {
  display: grid;
  gap: 0.45rem;
}

dialog.pay-dialog .pay-actions .button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  max-width: 100%;
  min-height: 3rem;
}

dialog.pay-dialog .pay-result:empty {
  display: none;
}

@media (min-width: 52rem) {
  dialog.pay-dialog .checkout {
    grid-template-columns: minmax(0, 1.12fr) minmax(17rem, 0.88fr);
    align-items: start;
  }

  dialog.pay-dialog .pay-panel {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 0.65rem;
  }

  dialog.pay-dialog .stub-note,
  dialog.pay-dialog .wallets,
  dialog.pay-dialog .pay-or,
  dialog.pay-dialog .pay-panel > .field:has(input[name="qty"]),
  dialog.pay-dialog fieldset,
  dialog.pay-dialog .pay-total,
  dialog.pay-dialog .pay-actions,
  dialog.pay-dialog .pay-result {
    grid-column: 1 / -1;
  }
}

@media (max-width: 40rem) {
  dialog.pay-dialog .card-row,
  dialog.pay-dialog .fare {
    grid-template-columns: 1fr;
  }
}

.stepper {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.stepper .step {
  flex: 0 0 auto;
  min-width: 2.75rem;
  min-height: 2.75rem;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--gold);
  color: var(--gold-ink);
  font: inherit;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  scale: 1;
}

.stepper .step:active {
  scale: 0.94;
}

.stepper .step:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.stepper .step:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.stepper input[type="number"] {
  width: 4.25rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
  appearance: textfield;
}

.stepper input[type="number"]::-webkit-outer-spin-button,
.stepper input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.pay-actions .button,
.pay-total strong {
  scale: 1;
}

.pay-pop {
  animation: pay-pop 0.42s ease;
}

@keyframes pay-pop {
  35% { scale: 1.07; }
  100% { scale: 1; }
}

.heart-stage {
  position: absolute;
  inset: 0;
  z-index: 4;
  overflow: visible;
  pointer-events: none;
}

.fly-heart {
  position: absolute;
  color: #d3124a;
  pointer-events: none;
  filter: drop-shadow(0 1px 0 rgb(240 180 41 / 0.9));
}

.fly-heart.gold {
  color: var(--rust-hot);
}

@media (prefers-reduced-motion: reduce) {
  .pay-pop,
  .stepper .step:active {
    animation: none;
    scale: 1;
  }

  .fly-heart {
    display: none;
  }
}

@media (forced-colors: active) {
  dialog.pay-dialog .wallet,
  .pass-hero img,
  .stepper .step {
    border: 1px solid ButtonText;
  }
}
