/**
 * CRWLC Registration form.
 *
 * Crimson and cream are the fraternity's own colors, so the palette is given rather than chosen.
 * The work here is in the execution: generous spacing, one serif voice for headings that matches
 * the printed receipt and confirmation, and selection cards in place of bare radio buttons, which
 * is where a form of this age most shows it.
 *
 * Every class the script relies on is preserved; this file changes appearance only.
 */

.crwlc-form-wrap {
  --crwlc-crimson: #70110C;
  --crwlc-crimson-deep: #550D09;
  --crwlc-crimson-bright: #8E1710;
  --crwlc-cream: #F2EBD7;
  --crwlc-cream-soft: #FBF7EC;
  --crwlc-ink: #1C1917;
  --crwlc-muted: #6E6560;
  --crwlc-line: #E3DCCC;
  --crwlc-line-strong: #CFC4AE;
  --crwlc-surface: #FFFFFF;
  --crwlc-ok: #1D5B1D;
  --crwlc-err: #B32D2E;

  --crwlc-serif: Georgia, 'Iowan Old Style', 'Times New Roman', serif;
  --crwlc-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  --crwlc-radius: 10px;
  --crwlc-radius-sm: 7px;

  max-width: 760px;
  margin: 0 auto;
  color: var(--crwlc-ink);
  font-family: var(--crwlc-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.crwlc-form-wrap *,
.crwlc-form-wrap *::before,
.crwlc-form-wrap *::after { box-sizing: border-box; }

/* The card everything sits in. The crimson keyline across the top is the one piece of ornament. */
.crwlc-form-wrap .crwlc-form {
  background: var(--crwlc-surface);
  border: 1px solid var(--crwlc-line);
  border-top: 4px solid var(--crwlc-crimson);
  border-radius: var(--crwlc-radius);
  padding: 30px 32px 26px;
  box-shadow: 0 1px 2px rgba(28,25,23,.04), 0 8px 24px -12px rgba(28,25,23,.12);
}

/* ------------------------------------------------------------------ progress */

.crwlc-form-wrap .crwlc-progress {
  display: flex;
  margin: 0 0 28px;
  padding: 0 0 22px;
  border-bottom: 1px solid var(--crwlc-line);
  list-style: none;
}

.crwlc-form-wrap .crwlc-progress li {
  flex: 1 1 0;
  position: relative;
  text-align: center;
  padding-top: 30px;
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .03em;
  color: var(--crwlc-muted);
}

.crwlc-form-wrap .crwlc-progress li::before {
  content: '';
  position: absolute;
  top: 10px;
  left: -50%;
  width: 100%;
  height: 2px;
  background: var(--crwlc-line);
}
.crwlc-form-wrap .crwlc-progress li:first-child::before { display: none; }

.crwlc-form-wrap .crwlc-progress li::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--crwlc-surface);
  border: 2px solid var(--crwlc-line-strong);
}

.crwlc-form-wrap .crwlc-progress li.is-done::before,
.crwlc-form-wrap .crwlc-progress li.is-current::before { background: var(--crwlc-crimson); }

.crwlc-form-wrap .crwlc-progress li.is-done::after,
.crwlc-form-wrap .crwlc-progress li.is-current::after {
  background: var(--crwlc-crimson);
  border-color: var(--crwlc-crimson);
}
.crwlc-form-wrap .crwlc-progress li.is-current::after { box-shadow: 0 0 0 4px rgba(112,17,12,.14); }

.crwlc-form-wrap .crwlc-progress li.is-current { color: var(--crwlc-crimson); font-weight: 600; }
.crwlc-form-wrap .crwlc-progress li.is-done { color: var(--crwlc-ink); }

/* --------------------------------------------------------------- typography */

.crwlc-form-wrap h2 {
  font-family: var(--crwlc-serif);
  font-size: 25px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--crwlc-crimson);
  margin: 0 0 18px;
  letter-spacing: -.01em;
}

.crwlc-form-wrap h3 {
  font-family: var(--crwlc-serif);
  font-size: 18px;
  color: var(--crwlc-ink);
  margin: 28px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--crwlc-line);
}

.crwlc-form-wrap .crwlc-help {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--crwlc-muted);
  margin: 6px 0 0;
}

.crwlc-form-wrap .description { font-size: 13.5px; color: var(--crwlc-muted); }

/* ------------------------------------------------------------------- fields */

.crwlc-form-wrap label {
  display: block;
  margin: 0 0 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--crwlc-ink);
}

.crwlc-form-wrap input[type="text"],
.crwlc-form-wrap input[type="email"],
.crwlc-form-wrap input[type="tel"],
.crwlc-form-wrap input[type="number"],
.crwlc-form-wrap select,
.crwlc-form-wrap textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 12px 14px;
  font-family: inherit;
  /* 16px stops iOS zooming the page when a field takes focus. */
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--crwlc-ink);
  background: var(--crwlc-surface);
  border: 1px solid var(--crwlc-line-strong);
  border-radius: var(--crwlc-radius-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
  -webkit-appearance: none;
  appearance: none;
}

.crwlc-form-wrap textarea { min-height: 84px; resize: vertical; }
.crwlc-form-wrap input::placeholder,
.crwlc-form-wrap textarea::placeholder { color: #A9A099; }

.crwlc-form-wrap input:focus,
.crwlc-form-wrap select:focus,
.crwlc-form-wrap textarea:focus {
  outline: none;
  border-color: var(--crwlc-crimson);
  box-shadow: 0 0 0 3px rgba(112,17,12,.13);
}

/* Native select chrome is the most dated thing on the page. */
.crwlc-form-wrap select {
  padding-right: 40px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%236E6560' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}
.crwlc-form-wrap optgroup { font-style: normal; font-weight: 700; color: var(--crwlc-muted); }

.crwlc-form-wrap .crwlc-req { color: var(--crwlc-crimson); font-weight: 700; margin-left: 2px; }

/* --------------------------------------------------------- choices as cards */

.crwlc-form-wrap .crwlc-fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 22px;
  min-width: 0;
}

.crwlc-form-wrap .crwlc-fieldset legend {
  padding: 0;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--crwlc-ink);
}

/* A legend that heads a whole section rather than labelling one question, set to match the page
   headings so the two read at the same level. */
.crwlc-form-wrap .crwlc-fieldset legend.crwlc-section-legend {
  font-family: var(--crwlc-serif);
  font-size: 25px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--crwlc-crimson);
  letter-spacing: -.01em;
  margin-bottom: 14px;
}

/* Space above, so it reads as a new section rather than a label on the field before it. A class
   rather than :has(), so the spacing is the same on every browser. */
.crwlc-form-wrap .crwlc-fieldset-section { margin-top: 30px; }

/* A radio in a list of options becomes a card that can be hit with a thumb. */
.crwlc-form-wrap .crwlc-choice,
.crwlc-form-wrap .crwlc-inline,
.crwlc-form-wrap .crwlc-block {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin: 0 0 9px;
  padding: 13px 15px;
  font-weight: 400;
  font-size: 14.5px;
  line-height: 1.5;
  background-color: var(--crwlc-surface);
  border: 1px solid var(--crwlc-line-strong);
  border-radius: var(--crwlc-radius-sm);
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.crwlc-form-wrap .crwlc-inline { display: inline-flex; margin-right: 10px; }

/* The dietary box is a label but not a choice; keep it a plain field. */
.crwlc-form-wrap .crwlc-dietary-label,
.crwlc-form-wrap .crwlc-cardholder-label,
.crwlc-form-wrap .crwlc-zip-field {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  font-size: 13px;
  font-weight: 600;
  cursor: default;
  margin-bottom: 18px;
}

.crwlc-form-wrap .crwlc-choice:hover,
.crwlc-form-wrap .crwlc-inline:hover,
.crwlc-form-wrap .crwlc-block:hover {
  border-color: var(--crwlc-crimson-bright);
  background-color: var(--crwlc-cream-soft);
}

/* Selected state. Driven by a class the script sets, so it behaves the same on every browser
   rather than only where :has() is supported. */
.crwlc-form-wrap .crwlc-choice.is-selected,
.crwlc-form-wrap .crwlc-inline.is-selected,
.crwlc-form-wrap .crwlc-block.is-selected {
  border-color: var(--crwlc-crimson);
  background-color: var(--crwlc-cream-soft);
  box-shadow: inset 3px 0 0 var(--crwlc-crimson);
}

.crwlc-form-wrap input[type="radio"],
.crwlc-form-wrap input[type="checkbox"] {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--crwlc-crimson);
  cursor: pointer;
}

.crwlc-form-wrap .crwlc-radio-row { display: flex; flex-wrap: wrap; gap: 8px; clear: both; }
.crwlc-form-wrap .crwlc-radio-row > label { margin: 0; }

/* ----------------------------------------------------------- attendee cards */

.crwlc-form-wrap .crwlc-attendee-row {
  margin: 0 0 16px;
  padding: 18px 20px 4px;
  background: var(--crwlc-cream-soft);
  border: 1px solid var(--crwlc-line);
  border-radius: var(--crwlc-radius);
}

.crwlc-form-wrap .crwlc-attendee-head {
  font-family: var(--crwlc-serif);
  font-size: 15px;
  font-weight: 700;
  color: var(--crwlc-crimson);
  margin: 0 0 14px;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--crwlc-line);
}

/* background-color, not background: the shorthand would wipe the select's chevron image. */
.crwlc-form-wrap .crwlc-attendee-row input,
.crwlc-form-wrap .crwlc-attendee-row select,
.crwlc-form-wrap .crwlc-attendee-row textarea { background-color: var(--crwlc-surface); }

/* ------------------------------------------------------------------ amounts */

.crwlc-form-wrap .crwlc-amount-display {
  margin: 24px 0;
  padding: 4px 20px 10px;
  background: var(--crwlc-cream);
  border-radius: var(--crwlc-radius);
}

.crwlc-form-wrap .crwlc-total-table { width: 100%; border-collapse: collapse; }

.crwlc-form-wrap .crwlc-total-table th,
.crwlc-form-wrap .crwlc-total-table td {
  padding: 11px 0;
  text-align: left;
  font-size: 14px;
  font-weight: 400;
  border-bottom: 1px solid rgba(112,17,12,.12);
}
.crwlc-form-wrap .crwlc-total-table th { color: #6B5A4A; }
.crwlc-form-wrap .crwlc-total-table td { text-align: right; font-variant-numeric: tabular-nums; }

.crwlc-form-wrap .crwlc-total-row th,
.crwlc-form-wrap .crwlc-total-row td {
  border-bottom: 0;
  padding-top: 14px;
  font-family: var(--crwlc-serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--crwlc-crimson);
}

/* ------------------------------------------------------------------ payment */

.crwlc-form-wrap .crwlc-card-block {
  margin: 22px 0 4px;
  padding: 22px;
  background: var(--crwlc-surface);
  border: 1px solid var(--crwlc-line-strong);
  border-radius: var(--crwlc-radius);
}

.crwlc-form-wrap .crwlc-card-title {
  font-family: var(--crwlc-serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--crwlc-crimson);
  margin: 0 0 16px;
  letter-spacing: 0;
}

.crwlc-form-wrap .crwlc-payment-element { min-height: 180px; }
.crwlc-form-wrap .crwlc-card-secure { margin-top: 14px; }

/* ------------------------------------------------------------------ buttons */

.crwlc-form-wrap .crwlc-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--crwlc-line);
}

.crwlc-form-wrap button,
.crwlc-form-wrap .crwlc-badge-link {
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  /* Comfortably past the 44px a thumb needs. */
  padding: 14px 26px;
  border: 1px solid transparent;
  border-radius: var(--crwlc-radius-sm);
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, transform .08s ease, box-shadow .15s ease;
}

.crwlc-form-wrap .crwlc-next,
.crwlc-form-wrap .crwlc-submit,
.crwlc-form-wrap .crwlc-badge-link,
.crwlc-form-wrap .crwlc-add-chapter {
  background: var(--crwlc-crimson);
  color: #fff;
  border-color: var(--crwlc-crimson);
  box-shadow: 0 1px 2px rgba(85,13,9,.18);
}

.crwlc-form-wrap .crwlc-next:hover,
.crwlc-form-wrap .crwlc-submit:hover,
.crwlc-form-wrap .crwlc-badge-link:hover,
.crwlc-form-wrap .crwlc-add-chapter:hover {
  background: var(--crwlc-crimson-bright);
  border-color: var(--crwlc-crimson-bright);
}

.crwlc-form-wrap .crwlc-next:active,
.crwlc-form-wrap .crwlc-submit:active,
.crwlc-form-wrap .crwlc-add-chapter:active { transform: translateY(1px); }

.crwlc-form-wrap .crwlc-prev {
  background: var(--crwlc-surface);
  color: var(--crwlc-ink);
  border-color: var(--crwlc-line-strong);
}
.crwlc-form-wrap .crwlc-prev:hover { border-color: var(--crwlc-ink); background: var(--crwlc-cream-soft); }

.crwlc-form-wrap button:focus-visible,
.crwlc-form-wrap .crwlc-badge-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(112,17,12,.3);
}

.crwlc-form-wrap button:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.crwlc-form-wrap .crwlc-add-chapter { font-size: 13.5px; padding: 10px 18px; }
.crwlc-form-wrap .crwlc-advisor-add { margin: 4px 0 6px; }

.crwlc-form-wrap .crwlc-remove-chapter {
  background: none;
  border: 0;
  padding: 4px 0;
  margin-left: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--crwlc-crimson);
  text-decoration: underline;
  box-shadow: none;
}

/* ----------------------------------------------------------------- messages */

.crwlc-form-wrap .crwlc-message { margin-top: 18px; font-size: 14.5px; line-height: 1.6; }
.crwlc-form-wrap .crwlc-message:empty { display: none; }

.crwlc-form-wrap .crwlc-message.crwlc-error {
  padding: 14px 16px;
  border: 1px solid rgba(179,45,46,.3);
  border-left: 4px solid var(--crwlc-err);
  border-radius: var(--crwlc-radius-sm);
  background: #FDF5F4;
  color: #7E1F20;
}

.crwlc-form-wrap .crwlc-message.crwlc-notice {
  padding: 14px 16px;
  border: 1px solid rgba(29,91,29,.25);
  border-left: 4px solid var(--crwlc-ok);
  border-radius: var(--crwlc-radius-sm);
  background: #F3F8F3;
  color: #17491A;
}

/* --------------------------------------------------------------- validation */

.crwlc-form-wrap input.crwlc-invalid,
.crwlc-form-wrap select.crwlc-invalid,
.crwlc-form-wrap textarea.crwlc-invalid {
  border-color: var(--crwlc-err);
  background-color: #FDF6F5;
}
.crwlc-form-wrap input.crwlc-invalid:focus,
.crwlc-form-wrap select.crwlc-invalid:focus,
.crwlc-form-wrap textarea.crwlc-invalid:focus { box-shadow: 0 0 0 3px rgba(179,45,46,.16); }

.crwlc-form-wrap .crwlc-invalid-group {
  padding: 12px 14px;
  border-left: 3px solid var(--crwlc-err);
  border-radius: var(--crwlc-radius-sm);
  background: #FDF6F5;
}

.crwlc-form-wrap .crwlc-field-error {
  display: block;
  margin-top: 5px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--crwlc-err);
}

.crwlc-form-wrap .crwlc-attendee-row.crwlc-row-invalid {
  border-color: var(--crwlc-err);
  background: #FDF6F5;
}

/* ------------------------------------------------------- confirmation states */

.crwlc-form-wrap .crwlc-confirmation,
.crwlc-form-wrap .crwlc-pending-transfer,
.crwlc-closed-notice {
  margin: 0 auto;
  padding: 34px 32px;
  background: #fff;
  border: 1px solid #E3DCCC;
  border-top: 4px solid #70110C;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(28,25,23,.04), 0 8px 24px -12px rgba(28,25,23,.12);
}

.crwlc-form-wrap .crwlc-confirmation { text-align: center; }
.crwlc-form-wrap .crwlc-confirmation h2,
.crwlc-form-wrap .crwlc-pending-transfer h2 { margin-bottom: 12px; }

/* NOT the serif face. Georgia sets old-style figures, where 3, 4, 5, 7 and 9 drop below the
   baseline and 6 and 8 rise above it, so a confirmation code appears to be set in mixed sizes.
   Lining, tabular figures keep every digit the same height and width. */
.crwlc-form-wrap .crwlc-confirm-code {
  font-family: var(--crwlc-sans);
  font-variant-numeric: lining-nums tabular-nums;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--crwlc-crimson);
  margin: 20px 0 2px;
}

.crwlc-form-wrap .crwlc-confirm-code-label {
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--crwlc-muted);
  margin-bottom: 22px;
}

.crwlc-form-wrap .crwlc-confirm-table {
  width: 100%;
  max-width: 380px;
  margin: 0 auto 20px;
  border-collapse: collapse;
  text-align: left;
}
.crwlc-form-wrap .crwlc-confirm-table th,
.crwlc-form-wrap .crwlc-confirm-table td {
  padding: 9px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--crwlc-line);
}
.crwlc-form-wrap .crwlc-confirm-table th { color: var(--crwlc-muted); font-weight: 500; padding-right: 14px; }
.crwlc-form-wrap .crwlc-confirm-table td { text-align: right; }

.crwlc-form-wrap .crwlc-badge-link { display: inline-block; text-decoration: none; }
.crwlc-form-wrap .crwlc-confirm-actions { margin: 20px 0 12px; }

/* -------------------------------------------------------------- responsive */

@media (max-width: 620px) {
  .crwlc-form-wrap .crwlc-form { padding: 22px 18px 20px; border-radius: 8px; }
  .crwlc-form-wrap h2,
  .crwlc-form-wrap .crwlc-fieldset legend.crwlc-section-legend { font-size: 21px; }
  .crwlc-form-wrap .crwlc-progress li { font-size: 11px; }
  .crwlc-form-wrap .crwlc-nav { flex-direction: column-reverse; align-items: stretch; }
  .crwlc-form-wrap .crwlc-nav button { width: 100%; }
  .crwlc-form-wrap .crwlc-inline { display: flex; margin-right: 0; }
  .crwlc-form-wrap .crwlc-attendee-row { padding: 16px 15px 2px; }
  .crwlc-form-wrap .crwlc-confirm-code { font-size: 32px; }
}

/* Some visitors set this because motion makes them unwell. */
@media (prefers-reduced-motion: reduce) {
  .crwlc-form-wrap *,
  .crwlc-form-wrap *::before,
  .crwlc-form-wrap *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- section counter --- */
.crwlc-form-wrap .crwlc-pane-count {
  margin: 0 0 4px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--crwlc-muted);
  text-align: right;
}
.crwlc-form-wrap .crwlc-section > h2:first-child { margin-top: 0; }

/* --- payment fields loading --- */
.crwlc-form-wrap .crwlc-card-block.is-loading .crwlc-payment-element {
  position: relative;
  min-height: 180px;
  border-radius: var(--crwlc-radius-sm);
  background: linear-gradient(100deg, var(--crwlc-cream-soft) 30%, #fff 50%, var(--crwlc-cream-soft) 70%);
  background-size: 220% 100%;
  animation: crwlc-shimmer 1.4s ease-in-out infinite;
}
.crwlc-form-wrap .crwlc-card-block.is-loading .crwlc-payment-element::after {
  content: 'Loading secure payment fields...';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  text-align: center;
  font-size: 13px;
  color: var(--crwlc-muted);
}
@keyframes crwlc-shimmer {
  0%   { background-position: 130% 0; }
  100% { background-position: -30% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .crwlc-form-wrap .crwlc-card-block.is-loading .crwlc-payment-element { animation: none; }
}
