/*
 * A53 Forms — public form styles.
 * Inherits the theme's typeface and text color, so it works on light and dark themes.
 * To match your site, override in the theme:
 *   .a53mc { --a53mc-accent: #2c5d7c; }
 */
.a53mc {
  --a53mc-accent: #2c5d7c;
  --a53mc-accent-ink: #ffffff;
  --a53mc-line: rgba(128, 128, 128, 0.38);
  --a53mc-soft: rgba(44, 93, 124, 0.07);
  --a53mc-error: #a3362a;
  --a53mc-radius: 6px;
  /* Accent and error colors used for TEXT. On browsers that support color-mix() they are
     blended with the page's own text color, so they stay readable on light and dark themes. */
  --a53mc-accent-text: var(--a53mc-accent);
  --a53mc-error-text: var(--a53mc-error);
  max-width: 42rem;
  margin: 0 auto 2rem;
  line-height: 1.55;
  color: inherit;
}
.a53mc *, .a53mc *::before, .a53mc *::after { box-sizing: border-box; }
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .a53mc {
    --a53mc-accent-text: color-mix(in srgb, var(--a53mc-accent) 55%, currentColor);
    --a53mc-error-text: color-mix(in srgb, var(--a53mc-error) 65%, currentColor);
  }
}

.a53mc-form { border: 1px solid var(--a53mc-line); border-top: 6px solid var(--a53mc-accent); border-radius: 10px; padding: 1.5rem 1.5rem 1.25rem; }
.a53mc-head { margin-bottom: 1rem; }
.a53mc-title { margin: 0 0 0.5rem; font-size: 1.6em; line-height: 1.2; }
.a53mc-title:focus, .a53mc-step-title:focus, .a53mc-page-head h3:focus { outline: none; }
.a53mc-desc { margin: 0; }
/* Some themes lay text blocks out as columns on wide screens, which pulls links out of their sentence. */
.a53mc .a53mc-desc, .a53mc .a53mc-help { display: block !important; }
.a53mc-desc a, .a53mc-help a { color: var(--a53mc-accent-text); }
.a53mc-reqnote { margin: 0 0 1rem; font-size: 0.875em; opacity: 0.8; }
.a53mc-star { color: var(--a53mc-error-text); font-weight: 600; }
.a53mc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.a53mc-page-head { margin: 0.5rem 0 0.25rem; padding: 0.75rem 1rem; background: var(--a53mc-soft); border-left: 3px solid var(--a53mc-accent); border-radius: 0 var(--a53mc-radius) var(--a53mc-radius) 0; }
.a53mc-page-head h3 { margin: 0 0 0.25rem; font-size: 1.15em; }
.a53mc-page-head .a53mc-help { margin: 0; }

.a53mc-alert { margin: 0 0 1rem; padding: 0.75rem 1rem; border: 1px solid var(--a53mc-error); border-left-width: 4px; border-radius: var(--a53mc-radius); color: var(--a53mc-error-text); }

/* Questions are separated by rules, not boxed. */
.a53mc-q { padding: 1.1rem 0; border-bottom: 1px solid var(--a53mc-line); }
.a53mc-q:last-child { border-bottom: 0; }
.a53mc-q:focus { outline: none; }
.a53mc-q.has-error { border-left: 3px solid var(--a53mc-error); padding-left: 0.85rem; margin-left: -1rem; }
.a53mc-q-title { display: block; font-weight: 600; margin-bottom: 0.35rem; }
.a53mc-help { font-size: 0.925em; opacity: 0.85; margin: 0 0 0.6rem; }
.a53mc-error { color: var(--a53mc-error-text); font-size: 0.925em; margin-top: 0.4rem; }
.a53mc-error[hidden] { display: none; }

.a53mc-section-title { margin: 0.5rem 0 0.35rem; font-size: 1.1em; }
.a53mc-fee { display: flex; justify-content: space-between; gap: 1rem; font-weight: 600; }

.a53mc-input {
  display: block; width: 100%; max-width: 100%;
  font: inherit; color: inherit; background: transparent;
  border: 1px solid var(--a53mc-line); border-radius: var(--a53mc-radius);
  padding: 0.55rem 0.7rem; min-height: 2.6rem;
}
.a53mc-input--short { max-width: 16rem; }
textarea.a53mc-input { resize: vertical; min-height: 6rem; }
.a53mc-select { max-width: 24rem; }
/* The open dropdown list is drawn by the browser, usually on white. The closed box inherits the
   theme's text color (light on a dark theme), so the choices get their own dark-on-white colors. */
.a53mc select option, .a53mc select optgroup { color: #1d2327; background-color: #ffffff; }
.a53mc-input:focus, .a53mc-select:focus { border-color: var(--a53mc-accent); }
.a53mc [aria-invalid="true"].a53mc-input { border-color: var(--a53mc-error); }

.a53mc-choices { display: grid; gap: 0.15rem; }
.a53mc-choice { display: flex; align-items: center; gap: 0.6rem; padding: 0.45rem 0.5rem; border-radius: var(--a53mc-radius); cursor: pointer; }
.a53mc-choice:hover { background: var(--a53mc-soft); }
.a53mc-choice input, .a53mc-other-label input { width: 1.15rem; height: 1.15rem; margin: 0; accent-color: var(--a53mc-accent); flex: none; }
.a53mc-choice-text { flex: 1; }
.a53mc-price { font-variant-numeric: tabular-nums; white-space: nowrap; opacity: 0.85; }
.a53mc-choice--other { flex-wrap: wrap; cursor: default; }
.a53mc-other-label { display: flex; align-items: center; gap: 0.6rem; cursor: pointer; }
.a53mc-other-text { flex: 1; min-width: 12rem; min-height: 2.2rem; padding: 0.35rem 0.6rem; }
.a53mc-link { background: none; border: 0; padding: 0.35rem 0.5rem; font: inherit; font-size: 0.9em; color: var(--a53mc-accent-text); text-decoration: underline; cursor: pointer; justify-self: start; }

.a53mc-scale { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.25rem 0.75rem; }
.a53mc-scale-step { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; cursor: pointer; min-width: 2rem; }
.a53mc-scale-step input { width: 1.2rem; height: 1.2rem; margin: 0; accent-color: var(--a53mc-accent); }
.a53mc-scale-end { font-size: 0.9em; opacity: 0.85; padding-bottom: 0.1rem; }

.a53mc-grid-wrap { overflow-x: auto; }
.a53mc-grid { border-collapse: collapse; min-width: 100%; }
.a53mc-grid th, .a53mc-grid td { padding: 0.5rem; text-align: center; border-bottom: 1px solid var(--a53mc-line); }
.a53mc-grid th[scope="row"] { text-align: left; font-weight: 500; }
.a53mc-grid thead th { font-weight: 500; font-size: 0.9em; }
.a53mc-grid input { width: 1.15rem; height: 1.15rem; accent-color: var(--a53mc-accent); }

.a53mc-money { display: flex; align-items: stretch; max-width: 12rem; }
.a53mc-money-sym { display: flex; align-items: center; padding: 0 0.6rem; border: 1px solid var(--a53mc-line); border-right: 0; border-radius: var(--a53mc-radius) 0 0 var(--a53mc-radius); background: var(--a53mc-soft); }
.a53mc-money .a53mc-input { border-radius: 0 var(--a53mc-radius) var(--a53mc-radius) 0; }

.a53mc-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.a53mc-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1rem; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--a53mc-line); }
.a53mc-total { margin: 0; }
.a53mc-total-amount { font-variant-numeric: tabular-nums; font-size: 1.15em; }
.a53mc-nav { display: flex; gap: 0.6rem; margin-left: auto; flex-wrap: wrap; }
.a53mc-btn {
  font: inherit; font-weight: 600; cursor: pointer;
  padding: 0.6rem 1.25rem; min-height: 2.75rem;
  border-radius: var(--a53mc-radius); border: 1px solid var(--a53mc-accent);
  background: var(--a53mc-accent); color: var(--a53mc-accent-ink);
}
.a53mc-btn:hover { filter: brightness(1.08); }
.a53mc-btn[disabled] { opacity: 0.6; cursor: wait; }
.a53mc-btn--quiet { background: transparent; color: var(--a53mc-accent-text); }

.a53mc input:focus-visible, .a53mc select:focus-visible, .a53mc textarea:focus-visible,
.a53mc button:focus-visible, .a53mc summary:focus-visible, .a53mc a:focus-visible {
  outline: 2px solid var(--a53mc-accent-text); outline-offset: 2px;
}

/* Review, payment and confirmation */
.a53mc-step-title { margin: 0.25rem 0 0.75rem; font-size: 1.2em; }
.a53mc-ledger { width: 100%; border-collapse: collapse; margin: 0 0 1rem; font-variant-numeric: tabular-nums; }
.a53mc-ledger td, .a53mc-ledger th { padding: 0.45rem 0; border-bottom: 1px solid var(--a53mc-line); text-align: left; }
.a53mc-ledger .a53mc-num { text-align: right; white-space: nowrap; padding-left: 1rem; }
.a53mc-ledger tfoot th, .a53mc-ledger tfoot td { border-bottom: 0; border-top: 2px solid currentColor; font-weight: 700; padding-top: 0.6rem; }
.a53mc-details { margin: 0.5rem 0 0; }
.a53mc-details summary { cursor: pointer; color: var(--a53mc-accent-text); }
.a53mc-answers { margin: 0.75rem 0 0; display: grid; grid-template-columns: minmax(8rem, 40%) 1fr; gap: 0.35rem 1rem; }
.a53mc-answers dt { font-weight: 600; }
.a53mc-answers dd { margin: 0; overflow-wrap: anywhere; }
.a53mc-meta { margin: 0.5rem 0; }
.a53mc-pay-option { padding: 1rem 0; border-top: 1px solid var(--a53mc-line); }
.a53mc-pay-option h4 { margin: 0 0 0.25rem; font-size: 1em; }
/* PayPal draws its buttons in its own frames, made for a light background, and they can't be
   recolored. So they sit on a white card shaped like the rest of the form, on any theme.
   color-scheme: light lets the frames blend into the card. */
.a53mc-paypal {
  display: grid; gap: 0.85rem;
  max-width: 26rem; margin-top: 0.75rem; padding: 1.25rem 1.25rem 0.75rem;
  background: #ffffff; color: #1d2327; color-scheme: light;
  border: 1px solid rgba(0, 0, 0, 0.08); border-radius: 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 10px 28px rgba(0, 0, 0, 0.22);
}
.a53mc-paypal:empty { display: none; } /* nothing shows until PayPal has loaded */
.a53mc-paypal-btn { min-height: 48px; }
.a53mc-pay-status { min-height: 1.5em; margin: 0.5rem 0 0; }
.a53mc-pay-status.is-error { color: var(--a53mc-error-text); }
.a53mc-mailbox { margin: 1rem 0; padding: 0.85rem 1rem; background: var(--a53mc-soft); border-radius: var(--a53mc-radius); }
.a53mc-mailbox p { margin: 0 0 0.5rem; }
.a53mc-json { max-height: 16rem; overflow: auto; font-size: 0.85em; padding: 0.75rem; background: var(--a53mc-soft); border-radius: var(--a53mc-radius); }
.a53mc--closed .a53mc-head { border: 1px solid var(--a53mc-line); border-top: 6px solid var(--a53mc-accent); border-radius: 10px; padding: 1.5rem; }

@media (max-width: 560px) {
  .a53mc-form { padding: 1.1rem 1rem 1rem; border-radius: 8px; }
  .a53mc-q.has-error { margin-left: -0.6rem; padding-left: 0.45rem; }
  .a53mc-answers { grid-template-columns: 1fr; }
  .a53mc-answers dd { margin-bottom: 0.5rem; }
  .a53mc-nav { width: 100%; }
  .a53mc-nav .a53mc-btn { flex: 1; }
}

/* Check-in code on the finish screen */
.a53mc-pass { margin-top: 1.25rem; padding: 1rem; border: 1px solid var(--a53mc-line); border-radius: var(--a53mc-radius); text-align: center; }
.a53mc-pass h4 { margin: 0 0 0.5rem; }
.a53mc-pass img { width: 200px; max-width: 100%; height: auto; image-rendering: pixelated; background: #fff; }
.a53mc-pass .a53mc-help { margin: 0.5rem auto; max-width: 28rem; }

/* Address (street, city, state, ZIP) and the agreement tick box (0.6.0) */
.a53mc-address { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.75rem; }
.a53mc-address-part { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.a53mc-address-part--street { grid-column: 1 / -1; }
.a53mc-address-part--city { grid-column: span 3; }
.a53mc-address-part--state { grid-column: span 1; }
.a53mc-address-part--zip { grid-column: span 2; }
.a53mc-address-label { font-size: 0.9em; }
@media (max-width: 30rem) {
  .a53mc-address-part--city, .a53mc-address-part--state, .a53mc-address-part--zip { grid-column: 1 / -1; }
}
.a53mc-consent { align-items: flex-start; }

/* File upload question */
.a53mc-file-wrap { display: grid; gap: 6px; }
.a53mc-file-wrap .a53mc-help { margin: 0; }
.a53mc-file-status { margin: 0; min-height: 1.4em; }
.a53mc-file-status.is-error { color: var(--a53mc-error-text); font-weight: 600; }
.a53mc-link-button { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; cursor: pointer; justify-self: start; font: inherit; }
