/* Connect existing registration forms to the upstream Bootstrap template.
   Business form grids, status colors, validation and permissions stay in the app. */
.ihbit-template.template-registration { --font-display:var(--bs-font-sans-serif); --font-body:var(--bs-font-sans-serif); --paper:#f8f3e9; --white:#fffdf8; }
.ihbit-template.template-registration :is(.auth-page,.portal-page,.intention-page,.auth-main,.intention-main) { background:var(--bs-body-bg); color:var(--bs-body-color); }
.ihbit-template.template-registration :is(.auth-index,.intention-index) { display:none; }
.ihbit-template.template-registration :is(.auth-main,.intention-main) { display:block; min-height:0; overflow:visible; padding:6rem 1.5rem; }
.ihbit-template.template-registration .auth-panel { width:min(100%,760px); margin:auto; padding:0; border:0; background:transparent; box-shadow:none; }
.ihbit-template.template-registration :is(.auth-panel h1,.intention-form-heading h1,.team-heading h1) { font-family:Montserrat,var(--bs-font-sans-serif); font-size:2.25rem; line-height:1.2; }
.ihbit-template.template-registration :is(.auth-panel > p:not(.section-kicker),.intention-form-heading > p:last-child) { color:var(--bs-body-color); }
.ihbit-template.template-registration :is(.auth-panel .section-kicker,.intention-form-heading .section-kicker) { color:#873e2f; }
.ihbit-template.template-registration .intention-form-panel { display:block; max-width:960px; background:transparent; border:0; box-shadow:none; }
.ihbit-template.template-registration .intention-form-heading { background:transparent; color:var(--bs-body-color); text-align:center; padding:0 0 2rem; }
.ihbit-template.template-registration .intention-form { padding:0; }
.ihbit-template.template-registration .registration-workspace { padding-top:6rem; }
.ihbit-template.template-registration :is(.registration-section,.progress-card) { box-shadow:none; }
.ihbit-template.template-registration .auth-panel .stage-tracker li { background:#efe5d3; color:#29251f; border-color:#d4c3a5; }
.ihbit-template.template-registration .stage-tracker li[data-status="active"] { background:#322d26; color:#fffdf8; }
.ihbit-template.template-registration .google-login-button { background:#fff; color:#29251f; border:1px solid #98743b; border-radius:var(--bs-border-radius); margin:1.5rem 0; }
.ihbit-template.template-registration .google-login-button:hover:not(:disabled) { background:#efe5d3; }
.ihbit-template.template-registration .form-error { background:#f5e5de; color:#8f2a1b; border-color:#8f2a1b; }
.ihbit-template.template-registration .list-group { --bs-list-group-bg:#fffdf8; --bs-list-group-color:#29251f; --bs-list-group-action-color:#29251f; --bs-list-group-action-hover-bg:#efe5d3; }
.ihbit-template.template-registration .status-badge { font-family:var(--bs-font-sans-serif); }
@media (min-width:992px) { .ihbit-template.template-registration :is(.auth-panel h1,.intention-form-heading h1,.team-heading h1) { font-size:3rem; } }
.ihbit-template.template-registration .submit-button { background:#873e2f; box-shadow:none; border-radius:var(--bs-border-radius); }
.ihbit-template.template-registration .submit-button:hover:not(:disabled) { background:#6c3025; box-shadow:none; }

/* ---------- Layout fixes: keep app form layouts under the template reboot ----------
   The template's Bootstrap reboot (label inline-block, floating 24px legend, fieldset
   reset, underlined links, square buttons) loads after the app CSS with equal
   specificity. These rules restore the existing app layouts on registration pages
   only. Fonts are inherited from the template and are not changed here. */
/* Top spacing below the fixed navbar. The empty template masthead is 192px under 992px
   (navbar 102px) but only 128px from 992px up (navbar ~144px), so content either sat
   ~186px down on phones or slid under the navbar on desktop. */
.ihbit-template.template-registration .registration-workspace,
.ihbit-template.template-registration > main.page-section,
.ihbit-template.template-registration :is(.auth-main,.intention-main) { padding-top:0; }
@media (min-width:992px) {
  .ihbit-template.template-registration .registration-workspace { padding-top:4.5rem; }
  .ihbit-template.template-registration > main.page-section,
  .ihbit-template.template-registration :is(.auth-main,.intention-main) { padding-top:6rem; }
}

/* Stacked label → full-width control, as designed for every registration form */
.ihbit-template.template-registration :is(.entry-form,.administration-form,.intention-form,.redeem-form,.submission-control) label:not(:is(.checkbox-line,.radio-line,.consent-field)),
.ihbit-template.template-registration .form-field { display:grid; align-content:start; gap:.4rem; min-width:0; }
.ihbit-template.template-registration :is(.entry-form,.administration-form,.intention-form,.redeem-form) label:not(:is(.checkbox-line,.radio-line,.consent-field)) > :is(input,select,textarea) { width:100%; }
.ihbit-template.template-registration :is(.checkbox-line,.radio-line,.consent-field) { display:flex; align-items:flex-start; gap:.6rem; line-height:1.6; }
.ihbit-template.template-registration :is(.checkbox-line,.radio-line,.consent-field) > input { flex:0 0 auto; width:18px; height:18px; margin-top:.2rem; }

/* Fieldsets and legends: no floating legend, keep each group's own frame */
.ihbit-template.template-registration :is(.registration-workspace,.intention-form,.redeem-form) legend { float:none; width:auto; margin-bottom:.5rem; font-size:.875rem; line-height:1.4; font-weight:800; }
.ihbit-template.template-registration .form-group { display:grid; grid-template-columns:1fr 1fr; gap:1.25rem; padding:1.25rem 0 0; border-top:1px solid var(--line); }
.ihbit-template.template-registration .form-group > legend { grid-column:1 / -1; padding:0; color:#873e2f; letter-spacing:.04em; }
.ihbit-template.template-registration .administration-form fieldset:not(.birth-date-field) { display:grid; gap:.8rem; padding:1.25rem; border:1px solid var(--line); border-radius:6px; }
.ihbit-template.template-registration .administration-form legend { padding:0 .5rem; color:#873e2f; }
.ihbit-template.template-registration .birth-date-field { display:grid; gap:.4rem; align-content:start; }
.ihbit-template.template-registration .birth-date-field legend { margin:0; color:var(--ink-soft); font-size:.75rem; font-weight:700; }
.ihbit-template.template-registration .birth-calendar-toggle { display:inline-flex; align-items:center; justify-content:center; gap:.5rem; width:100%; min-height:var(--control-height); }

/* Section navigation: one row for all sections, no link underline */
.ihbit-template.template-registration .wizard-nav { grid-template-columns:none; grid-auto-flow:column; grid-auto-columns:minmax(0,1fr); }
.ihbit-template.template-registration .wizard-nav a { color:var(--white); text-decoration:none; }
.ihbit-template.template-registration .wizard-nav-step { color:#c7aa72; }
/* Keep dark text on the gold hover/focus background after the scoped overrides. */
.ihbit-template.template-registration .wizard-nav a:is(:hover,:focus-visible),
.ihbit-template.template-registration .wizard-nav a:is(:hover,:focus-visible) :is(.wizard-nav-step,.wizard-nav-state) { color:var(--ink); }
@media (max-width:680px) {
  .ihbit-template.template-registration .wizard-nav { grid-auto-flow:row; grid-template-columns:repeat(2,minmax(0,1fr)); }
}

/* Roster rows: aligned upload button, readable photo placeholder */
.ihbit-template.template-registration .photo-upload button { display:inline-flex; align-items:center; justify-content:center; gap:.45rem; white-space:nowrap; }
.ihbit-template.template-registration .roster-portrait-unavailable { font-size:.72rem; line-height:1.45; letter-spacing:normal; text-align:center; }
.ihbit-template.template-registration .roster-issues { margin:0 0 .5rem; }
.ihbit-template.template-registration .roster-issues li + li { margin-top:.2rem; }

/* Headings: keep the template's centred intro consistent */
.ihbit-template.template-registration .intention-form-heading .section-kicker { text-align:center; }
.ihbit-template.template-registration .progress-card .section-kicker { letter-spacing:.12em; }

@media (max-width:600px) {
  .ihbit-template.template-registration .form-group { grid-template-columns:1fr; }
  .ihbit-template.template-registration :is(.team-heading,.portal-heading) .section-kicker { letter-spacing:.08em; }
}

/* Field-level hints and errors stay small; the template sizes every <p> like body copy */
.ihbit-template.template-registration :is(.entry-form,.administration-form,.intention-form,.redeem-form,.birth-date-field) :is(p.field-hint,p.field-error) { margin:0; font-size:.8rem; line-height:1.5; }

/* Invitation code page: leftovers from the former dark panel were white-on-cream */
.ihbit-template.template-registration .redeem-form .form-field { color:var(--ink-soft); }
.ihbit-template.template-registration .signed-in-as { align-items:center; flex-wrap:wrap; border-color:var(--line); background:#fffdf8; }
.ihbit-template.template-registration .signed-in-as strong { color:#873e2f; overflow-wrap:anywhere; }

/* Registration notice: keep the app's list and consent layout under the template's ol/p/label defaults */
.ihbit-template.template-registration .registration-notice-list { padding:0; margin:0; }
.ihbit-template.template-registration .registration-notice-list strong { display:block; font-size:1rem; line-height:1.5; }
.ihbit-template.template-registration .registration-notice-list p { margin:.4rem 0 0; font-size:.88rem; line-height:1.8; }
.ihbit-template.template-registration .registration-notice-consent { display:flex; }
.ihbit-template.template-registration .intention-form-heading > p:last-child { max-width:720px; margin-inline:auto; text-align:center; }
@media (max-width:680px) {
  /* Section card + form card: trim the inner padding so fields keep usable width on phones */
  .ihbit-template.template-registration :is(form.entry-form,.entry-form form) { padding:1rem; }
  .ihbit-template.template-registration .administration-form fieldset:not(.birth-date-field) { padding:1rem; }
}

/* The template justifies every <p> (made for wide Chinese homepage copy). In registration
   forms that opens large word gaps in English on phones, so align body text to the start. */
.ihbit-template.template-registration :is(.registration-workspace,.auth-main,.intention-form,.redeem-form,.registration-notice-form) p { text-align:start; }

/* Keep the intention confirmation readable within the template's heading/body rules. */
.ihbit-template.template-registration .intention-form .confirm-dialog h2 { font-size:1.5rem; line-height:1.3; margin:0 0 var(--space-3); }
.ihbit-template.template-registration .intention-form .confirm-dialog-body p { font-size:1rem; line-height:1.75; text-align:start; }
