/* =================================================================== */
/* SDWAC — Membership Application widget restyle  (CLEAN REWRITE)       */
/* Destination: WildApricot admin -> Website -> CSS  (writes User.css). */
/*                                                                     */
/* Replaces the old 855-line version. Selectors are taken from the      */
/* theme's own form stylesheet (Gadgets/basic.shared.form.less), so      */
/* they match the REAL gadget DOM instead of guessing.                  */
/*                                                                     */
/* THE KEY FIX: WildApricot lays every form field out as a hard two-     */
/* column float — .fieldLabel = 23% (left), .fieldBody = 75% (right).    */
/* On the membership form that squeezes the level cards into a narrow    */
/* right column. Section 2 below COLLAPSES that two-column layout to a    */
/* single full-width stacked column. That is what stops the right-edge    */
/* pinning. Everything else is cosmetic.                                 */
/*                                                                     */
/* Palette continues the dark "Join the Council" strip rendered by the   */
/* Custom HTML gadget directly above this gadget.                        */
/* =================================================================== */

:root {
  --sd-ink:#0E2236; --sd-ink-2:#1A2F49; --sd-paper-2:#FAF7EC;
  --sd-champagne:#E8C9A2; --sd-serif:'Source Serif 4',Georgia,serif;
  --sd-sans:Inter,system-ui,Segoe UI,Arial,sans-serif;
  --sd-mono:'JetBrains Mono',ui-monospace,Consolas,monospace;
}

/* ---- 1. Gadget shell: dark, centered, NOT full-bleed --------------- */
.WaGadgetMembershipApplication {
  background: var(--sd-ink) !important;
  color: var(--sd-paper-2) !important;
  font-family: var(--sd-serif) !important;
  border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
  /* override theme sdwac.less §26b's max-width:720px so the dark form
     fills its column like the strip above, instead of a narrow box */
  max-width: none !important;
  margin: 0 !important;
  padding: clamp(28px,4vw,52px) clamp(20px,5vw,72px) clamp(56px,7vw,90px) !important;
}
/* Center the actual form content to a readable column */
.WaGadgetMembershipApplication .generalFormOuterContainer,
.WaGadgetMembershipApplication .generalFormContainer,
.WaGadgetMembershipApplication .sectionOuterContainer,
.WaGadgetMembershipApplication .navigationOuterContainer {
  max-width: 760px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  width: 100% !important;
  float: none !important;
  box-sizing: border-box !important;
  background: transparent !important;
  border: 0 !important;
}

/* ---- 2. THE FIX: collapse WA's 23% / 75% two-column field layout ---- */
/* Source: basic.shared.form.less — .fieldLabel{width:23%;float:left}    */
/* .fieldBody{width:75%;float:left}, plus a td.left/td.right table form. */
.WaGadgetMembershipApplication .fieldSubContainer,
.WaGadgetMembershipApplication .fieldLabel,
.WaGadgetMembershipApplication .fieldBody,
.WaGadgetMembershipApplication .captionContainer .fieldLabel,
.WaGadgetMembershipApplication .captionContainer .fieldBody,
.WaGadgetMembershipApplication .fieldSubContainer table,
.WaGadgetMembershipApplication .fieldSubContainer tbody,
.WaGadgetMembershipApplication .fieldSubContainer tr,
.WaGadgetMembershipApplication .fieldSubContainer td,
.WaGadgetMembershipApplication .fieldSubContainer td.left,
.WaGadgetMembershipApplication .fieldSubContainer td.right {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  text-align: left !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  vertical-align: top !important;
}
.WaGadgetMembershipApplication .fieldSubContainer { margin-bottom: 26px !important; }

/* ---- 3. Field labels: champagne mono, above their input ------------ */
.WaGadgetMembershipApplication .fieldLabel,
.WaGadgetMembershipApplication label {
  font-family: var(--sd-mono) !important;
  font-size: 11px !important;
  letter-spacing: 0.16em !important;
  text-transform: uppercase !important;
  color: var(--sd-champagne) !important;
  font-weight: 700 !important;
  margin: 0 0 10px !important;
}

/* ---- 4. Inputs / selects: transparent w/ paper underline ----------- */
.WaGadgetMembershipApplication input[type="text"],
.WaGadgetMembershipApplication input[type="email"],
.WaGadgetMembershipApplication input[type="tel"],
.WaGadgetMembershipApplication input[type="password"],
.WaGadgetMembershipApplication select,
.WaGadgetMembershipApplication textarea {
  width: 100% !important;
  box-sizing: border-box !important;
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(245,239,224,.4) !important;
  border-radius: 0 !important;
  padding: 11px 2px !important;
  font-family: var(--sd-serif) !important;
  font-size: 17px !important;
  color: var(--sd-paper-2) !important;
}
.WaGadgetMembershipApplication input:focus,
.WaGadgetMembershipApplication select:focus,
.WaGadgetMembershipApplication textarea:focus {
  outline: none !important;
  border-bottom-color: var(--sd-champagne) !important;
}
.WaGadgetMembershipApplication select option { background: var(--sd-ink) !important; color: var(--sd-paper-2) !important; }

/* ---- 5. Membership-level selector: full-width stacked cards -------- */
.WaGadgetMembershipApplication .groupBodyVertical {
  display: grid !important;
  gap: 12px !important;
  width: 100% !important;
}
.WaGadgetMembershipApplication .fieldItem {
  display: block !important;
  width: 100% !important;
  background: var(--sd-ink-2) !important;
  border: 1px solid rgba(245,239,224,.18) !important;
  padding: 18px 20px !important;
  margin: 0 !important;
  cursor: pointer !important;
  transition: border-color .15s, background .15s !important;
}
.WaGadgetMembershipApplication .fieldItem:hover { border-color: var(--sd-champagne) !important; background:#243A57 !important; }
/* radio sits inline-left of the level text */
.WaGadgetMembershipApplication .fieldItem span.typeRadioContainer {
  float: left !important;
  width: auto !important;
  margin: 3px 12px 0 0 !important;
}
.WaGadgetMembershipApplication .fieldItem input.typeRadio,
.WaGadgetMembershipApplication .fieldItem input[type="radio"] {
  width: 16px !important; height: 16px !important; margin: 0 !important;
  accent-color: var(--sd-champagne) !important;
}
.WaGadgetMembershipApplication .fieldItem span.label {
  display: block !important;
  overflow: hidden !important;
  color: var(--sd-paper-2) !important;
  font-family: var(--sd-serif) !important;
}
.WaGadgetMembershipApplication .fieldItem .labelTitle,
.WaGadgetMembershipApplication .fieldItem .label > span:first-child {
  font-weight: 600 !important; font-size: 18px !important; color: var(--sd-paper-2) !important;
}
.WaGadgetMembershipApplication .fieldItem .labelSubTitle,
.WaGadgetMembershipApplication .fieldItem .levelPrice {
  color: var(--sd-champagne) !important; font-weight: 600 !important;
}
/* subscription-period / renewal notes + level description -> white */
.WaGadgetMembershipApplication .fieldItem .typeInstruction,
.WaGadgetMembershipApplication .fieldItem .levelDescription,
.WaGadgetMembershipApplication .fieldItem .extraInfo,
.WaGadgetMembershipApplication .fieldItem .label .textLine.typeInstruction {
  font-family: var(--sd-mono) !important;
  font-size: 10px !important;
  letter-spacing: 0.10em !important;
  text-transform: uppercase !important;
  color: var(--sd-paper-2) !important;   /* near-white #FAF7EC on the dark form */
}

/* ---- 6. Mandatory note + validation -------------------------------- */
.WaGadgetMembershipApplication .mandatoryFieldsTitle {
  font-family: var(--sd-mono) !important; font-size: 11px !important;
  letter-spacing: 0.10em !important; text-transform: uppercase !important;
  color: rgba(245,239,224,.55) !important; margin: 0 0 22px !important; text-align: left !important;
}
.WaGadgetMembershipApplication .mandatorySymbol,
.WaGadgetMembershipApplication .requiredSymbol { color: var(--sd-champagne) !important; }
.WaGadgetMembershipApplication .validationError,
.WaGadgetMembershipApplication .field-validation-error {
  font-family: var(--sd-sans) !important; font-size: 12px !important; color: #E8A0AA !important; margin-top: 6px !important;
}

/* ---- 7. Hide WA's own form title (the strip above provides it) ----- */
.WaGadgetMembershipApplication .formTitleOuterContainer { display: none !important; }

/* ---- 7b. Read-only summary / selected-level panel (data-entry &      */
/*         review steps). WA renders this on a WHITE background with     */
/*         faint text, so on the dark form it reads as an invisible      */
/*         white band. Drop the dark form background through it, center  */
/*         it to the form column, and make the text legible.            */
.WaGadgetMembershipApplication .infoOuterContainer,
.WaGadgetMembershipApplication .infoContainer,
.WaGadgetMembershipApplication .summaryOuterContainer,
.WaGadgetMembershipApplication .summaryContainer,
.WaGadgetMembershipApplication .summary,
.WaGadgetMembershipApplication .selectedLevel,
.WaGadgetMembershipApplication .selectedLevelInfo,
.WaGadgetMembershipApplication .selectedLevelContainer,
.WaGadgetMembershipApplication .selectedMembershipLevel,
.WaGadgetMembershipApplication .membershipLevelInfo {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  max-width: 760px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
/* Read-only field VALUES (plain text, not <input>s) need light text */
.WaGadgetMembershipApplication .fieldBody,
.WaGadgetMembershipApplication .fieldBody span,
.WaGadgetMembershipApplication .fieldBody div,
.WaGadgetMembershipApplication .infoOuterContainer,
.WaGadgetMembershipApplication .infoOuterContainer *,
.WaGadgetMembershipApplication .summary,
.WaGadgetMembershipApplication .summary * {
  color: var(--sd-paper-2) !important;
}

/* ---- 8. Buttons: Next/submit = paper invert, Back = ghost ---------- */
.WaGadgetMembershipApplication .navigationContainer { overflow: hidden !important; }
.WaGadgetMembershipApplication .navigationContainer .right { float: right !important; }
.WaGadgetMembershipApplication .navigationContainer .left  { float: left !important; }
.WaGadgetMembershipApplication input.nextButton,
.WaGadgetMembershipApplication input[type="submit"],
.WaGadgetMembershipApplication button[type="submit"] {
  background: var(--sd-paper-2) !important;
  color: var(--sd-ink) !important;
  border: 0 !important; border-radius: 0 !important;
  font-family: var(--sd-sans) !important; font-weight: 600 !important;
  font-size: 15px !important; letter-spacing: 0.04em !important;
  padding: 15px 32px !important; cursor: pointer !important; width: auto !important;
}
.WaGadgetMembershipApplication input.nextButton:hover,
.WaGadgetMembershipApplication input[type="submit"]:hover { background: var(--sd-champagne) !important; }
.WaGadgetMembershipApplication input.prevButton,
.WaGadgetMembershipApplication input.cancelButton {
  background: transparent !important; color: var(--sd-paper-2) !important;
  border: 1px solid rgba(245,239,224,.5) !important; padding: 15px 26px !important; margin-right: 10px !important;
}

@media (prefers-reduced-motion: reduce) {
  .WaGadgetMembershipApplication * { transition-duration: .01ms !important; }
}
