/* Additions for the full Form 03 field set. The approved sample CSS is unchanged. */

:root {
  --bhs-green-ink: #107241;
  --bhs-error: #CB292A;
  --bhs-footer-bar: #0F4D2E;
}
.bhs-kicker,
.bhs-saved,
.bhs-form-btn--secondary {
  color: var(--bhs-green-ink);
}
.bhs-saved { transition: none; }
.bhs-trust-mobile { display: none; margin: 8px 0 0; font-size: 14px; line-height: 1.45; color: #282828; }
.bhs-money-prefix {
  position: absolute;
  left: 14px;
  top: 30px;
  z-index: 1;
  font-weight: 650;
  color: #282828;
  opacity: 0;
  pointer-events: none;
}
.bhs-field:focus-within .bhs-money-prefix,
.bhs-field:has(.is-filled) .bhs-money-prefix { opacity: 1; }
.bhs-review-section {
  margin: 0 0 12px;
  padding: 14px 16px 6px;
  border: 1px solid rgba(40, 40, 40, 0.12);
  border-radius: 12px;
  background: #fff;
}
.bhs-review-section header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 8px; }
.bhs-review-section h2 { margin: 0; font-size: 16px; }
.bhs-review-edit { border: 0; background: none; padding: 0; color: var(--bhs-green-ink); font-weight: 700; cursor: pointer; }
@media (max-width: 900px) {
  .bhs-trust-mobile { display: block; }
}
@media (max-width: 500px) {
  .bhs-lookup__row { flex-direction: column; align-items: stretch; }
  .bhs-lookup__row .bhs-form-input,
  .bhs-lookup__row .bhs-form-btn { width: 100%; }
}
[hidden] { display: none !important; }
.bhs-provisional {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #6b3e00;
}
.bhs-lookup { margin: 0 0 8px; }
.bhs-lookup__label { display: block; margin: 0 0 8px; font-weight: 700; }
.bhs-lookup__row { display: flex; gap: 8px; align-items: center; }
.bhs-lookup__row .bhs-form-input { flex: 1 1 auto; }
.bhs-lookup__row .bhs-form-btn { flex: 0 0 auto; }
.bhs-link a,
.bhs-form-page .bhs-stage a,
.bhs-step-help a,
.bhs-call a { color: var(--bhs-green-ink); }
.bhs-call { max-width: 40rem; margin: 48px auto; padding: 24px; }
.bhs-select {
  background-image: linear-gradient(45deg, transparent 50%, #107241 50%), linear-gradient(135deg, #107241 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}
/* Mobile label/input rules moved to the 'Mobile layout (Brady 5:12am)' block at the end of this file. */
.bhs-review { margin: 0 0 8px; }
.bhs-review-row { display: grid; gap: 2px; margin: 0 0 12px; }
.bhs-review-label { font-size: 13px; color: #3d4a42; }
.bhs-review-value { margin: 0; font-weight: 650; }
body[data-screen="end"] .bhs-mobile-header__bar > span {
  background: var(--bhs-green);
}

#app {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.bhs-date { padding-top: 22px; }
.bhs-date + .bhs-form-label {
  top: 10px;
  transform: none;
  font-size: 11px;
  letter-spacing: 0.02em;
}

.bhs-options { margin: 0; padding: 0; border: 0; min-width: 0; }
.bhs-options legend { margin: 0 0 8px; padding: 0; font-weight: 700; font-size: 14px; color: var(--bhs-text); }
.bhs-option {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 10px;
  padding: 14px 52px 14px 14px;
  border: 1.5px solid var(--bhs-field-border);
  border-radius: var(--bhs-radius-input);
  background: var(--bhs-white);
  font-weight: 500;
  line-height: 1.4;
}
.bhs-option span:first-of-type { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.bhs-option input { width: 22px; height: 22px; margin-top: 1px; flex: none; accent-color: var(--bhs-green-btn); }
.bhs-option .bhs-tick { top: 16px; right: 14px; transform: scale(0.6); }
.bhs-option:has(input:checked) .bhs-tick { opacity: 1; transform: scale(1); }
.bhs-options.is-error .bhs-option { border-color: var(--bhs-error); }
.bhs-options.is-error .bhs-form-error { display: block; }

select.bhs-form-input {
  padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, #5a5f5c 50%), linear-gradient(135deg, #5a5f5c 50%, transparent 50%);
  background-position: calc(100% - 18px) 26px, calc(100% - 13px) 26px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

textarea.bhs-form-input {
  height: auto;
  min-height: 120px;
  padding-top: 22px;
  resize: vertical;
}

select.bhs-form-input.is-filled,
textarea.bhs-form-input.is-filled,
select.bhs-form-input:focus,
textarea.bhs-form-input:focus {
  padding-top: 22px;
}

.bhs-field.is-valid .bhs-hint,
.bhs-field.is-error .bhs-hint { display: block; }
.bhs-field:has(select) .bhs-tick { right: 36px; }

select.bhs-form-input.is-filled + .bhs-form-label,
textarea.bhs-form-input.is-filled + .bhs-form-label,
select.bhs-form-input:focus + .bhs-form-label,
textarea.bhs-form-input:focus + .bhs-form-label {
  top: 10px;
  transform: none;
  font-size: 11px;
  letter-spacing: 0.02em;
}

.bhs-choices {
  margin: 0;
  padding: 14px 16px 8px;
  border: 1.5px solid var(--bhs-field-border);
  border-radius: var(--bhs-radius-input);
  background: var(--bhs-white);
}
.bhs-choices.is-error { border-color: var(--bhs-error); box-shadow: 0 0 0 4px rgba(214, 54, 55, 0.16); }
.bhs-choices legend {
  padding: 0 4px;
  font-weight: 700;
  font-size: 13px;
  color: var(--bhs-muted);
}
.bhs-choices label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 10px 0;
  font-weight: 500;
  line-height: 1.4;
}
.bhs-choices input,
.bhs-check input {
  width: 22px;
  height: 22px;
  margin-top: 1px;
  accent-color: var(--bhs-green-btn);
  flex: none;
}

.bhs-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  padding: 14px 16px;
  border: 1.5px solid var(--bhs-field-border);
  border-radius: var(--bhs-radius-input);
  background: var(--bhs-white);
  font-weight: 600;
  line-height: 1.45;
}
.bhs-check.is-error,
.bhs-choice-wrap.is-error .bhs-check { border-color: var(--bhs-error); }
.bhs-check + .bhs-form-error { margin-top: 6px; }
.bhs-check.is-error + .bhs-form-error,
.bhs-choice-wrap.is-error .bhs-form-error,
.bhs-choices.is-error .bhs-form-error { display: block; }

.bhs-live {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.bhs-form-reassurance {
  margin: 0 0 28px;
}

.bhs-photo-hold {
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px dashed rgba(40, 40, 40, 0.28);
  border-radius: 8px;
  background: var(--bhs-white);
}
.bhs-photo-hold__label { margin: 0 0 4px; font-weight: 700; }
.bhs-photo-hold__note { margin: 0; color: var(--bhs-muted); font-size: 13px; }

.bhs-step-help {
  margin: 0 0 22px;
  max-width: 40em;
  color: var(--bhs-text);
  line-height: 1.5;
}

.bhs-notice {
  margin: 0 0 22px;
  padding: 16px 18px 4px;
  border: 1px solid rgba(40, 40, 40, 0.12);
  border-radius: 8px;
  background: var(--bhs-white);
  color: var(--bhs-text);
  line-height: 1.5;
  max-width: 42em;
}
.bhs-notice__status {
  margin: 0 0 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff6e5;
  color: #6b3e00;
  font-size: 13px;
  font-weight: 600;
}
.bhs-notice h2 {
  margin: 0 0 12px;
  font-family: var(--bhs-font-heading);
  font-size: 22px;
  line-height: 1.25;
}
.bhs-notice p { margin: 0 0 12px; }
.bhs-notice a { color: var(--bhs-green-btn); }

/* Mobile inner-scroll container removed; see the 'Mobile layout (Brady 5:12am)' block at the end of this file. */

@media (min-width: 1024px) {
  body[data-screen="welcome"],
  body[data-screen="end"] {
    height: 100vh;
    overflow: hidden;
  }
  body[data-screen="welcome"] #app,
  body[data-screen="end"] #app {
    height: 100vh;
    min-height: 0;
    overflow: hidden;
  }
  body[data-screen="welcome"] .bhs-shell,
  body[data-screen="end"] .bhs-shell {
    min-height: 0;
    overflow: hidden;
  }
  body[data-screen="welcome"] .bhs-form-title,
  body[data-screen="end"] .bhs-form-title {
    font-size: 40px;
    margin-bottom: 10px;
  }
  body[data-screen="welcome"] .bhs-form-intro,
  body[data-screen="end"] .bhs-form-intro {
    margin-bottom: 16px;
  }
  body[data-screen="welcome"] .bhs-stage__scroll,
  body[data-screen="end"] .bhs-stage__scroll {
    padding-top: 28px;
    padding-bottom: 16px;
  }
  body[data-screen="welcome"] .bhs-form-prefooter,
  body[data-screen="end"] .bhs-form-prefooter {
    padding-top: 12px;
    padding-bottom: 10px;
  }
  body[data-screen="welcome"] .bhs-prefooter-logo,
  body[data-screen="end"] .bhs-prefooter-logo {
    height: 40px;
  }
  body[data-screen="welcome"] .bhs-form-copyright,
  body[data-screen="end"] .bhs-form-copyright {
    padding-top: 8px;
    padding-bottom: 8px;
  }
}

/* ==========================================================================
   Mobile layout (Brady 5:12am phone feedback via DB, 24 Nov 2026).
   Front end only. Desktop (>900px) is untouched by this block.
   ========================================================================== */
@media (max-width: 900px) {
  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scrollbar-gutter: auto;
  }
  .bhs-form-page {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  /* One natural page scroll (no inner scroll box, no fixed 100dvh stage), so iOS
     Safari can collapse its toolbar and scroll a focused field above the keyboard. */

  /* Header stays put while the page scrolls, and clears the notch. */
  .bhs-mobile-header {
    position: sticky;
    top: 0;
    z-index: 20;
    padding-top: calc(10px + env(safe-area-inset-top, 0px));
    padding-left: max(20px, env(safe-area-inset-left, 0px));
    padding-right: max(20px, env(safe-area-inset-right, 0px));
  }

  /* Kicker and Saved chip share one line, even on a 375px phone. */
  .bhs-stage__meta { gap: 8px; }
  .bhs-kicker { font-size: 11px; letter-spacing: 0.05em; white-space: nowrap; min-width: 0; }
  .bhs-saved { flex: 0 0 auto; }

  .bhs-stage__scroll {
    padding-left: max(20px, env(safe-area-inset-left, 0px));
    padding-right: max(20px, env(safe-area-inset-right, 0px));
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  }

  /* A field focused by the browser or by validation is never hidden under the header. */
  .bhs-form-step h1,
  .bhs-field,
  .bhs-options,
  .bhs-choice-wrap,
  .bhs-lookup,
  .bhs-form-input {
    scroll-margin-top: 84px;
    scroll-margin-bottom: 24px;
  }

  /* Buttons: one line, primary takes the spare width, no sticky gold after a tap. */
  .bhs-form-actions {
    margin-top: 4px;
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom, 0px));
  }
  .bhs-form-actions .bhs-form-btn { white-space: nowrap; }
  /* Form 03 "name" screen keeps the in-flow buttons it had before this change. */
  body[data-screen="name"] .bhs-form-actions {
    position: static;
    left: auto; right: auto; bottom: auto;
    z-index: 1;
    background: transparent;
    backdrop-filter: none;
    border-top: 0;
  }
  .bhs-form-actions .bhs-form-btn--secondary {
    flex: 0 0 auto;
    min-width: 0;
    padding-left: 20px;
    padding-right: 22px;
  }
  .bhs-form-actions .bhs-form-btn--primary {
    flex: 1 1 auto;
    min-width: 0;
  }
  .bhs-trust-mobile { margin: 4px 0 16px; font-size: 13px; color: var(--bhs-muted); }
  body[data-screen="welcome"] .bhs-trust-mobile { margin-top: -12px; }

  /* Review: long values wrap inside the card; Edit is a full-size tap target. */
  .bhs-review-row { grid-template-columns: minmax(0, 1fr); }
  .bhs-review-value { overflow-wrap: anywhere; word-break: break-word; }
  .bhs-review-section { padding: 12px 16px 4px; }
  .bhs-review-section header { margin: 0 0 4px; }
  .bhs-review-edit {
    min-height: 44px;
    min-width: 44px;
    margin: -6px -10px -6px 0;
    padding: 0 10px;
    font-size: 15px;
  }
}

@media (max-width: 900px) and (hover: none) {
  .bhs-form-btn--primary:hover:not(:focus-visible) {
    background: var(--bhs-green-btn);
    border-color: var(--bhs-green-btn);
    color: var(--bhs-white);
  }
  .bhs-form-btn--secondary:hover:not(:focus-visible) {
    background: transparent;
    border-color: rgba(16, 114, 65, 0.75);
  }
}

/* Phones: labels sit above the box (long customer labels never clip), every
   label looks the same, and every box uses 16px text so iOS does not zoom. */
@media (max-width: 500px) {
  .bhs-field { display: flex; flex-direction: column; }
  .bhs-field .bhs-form-label,
  .bhs-field .bhs-form-input:focus + .bhs-form-label,
  .bhs-field .bhs-form-input:not(:placeholder-shown) + .bhs-form-label,
  .bhs-field .bhs-form-input.is-filled + .bhs-form-label,
  .bhs-field .bhs-date + .bhs-form-label,
  .bhs-field select.bhs-form-input.is-filled + .bhs-form-label,
  .bhs-field select.bhs-form-input:focus + .bhs-form-label,
  .bhs-field textarea.bhs-form-input.is-filled + .bhs-form-label,
  .bhs-field textarea.bhs-form-input:focus + .bhs-form-label {
    position: static;
    order: -1;
    transform: none;
    top: auto;
    margin: 0 0 6px;
    padding: 0 28px 0 0;
    max-width: 100%;
    white-space: normal;
    font-size: 15px;
    line-height: 1.35;
    letter-spacing: normal;
    color: var(--bhs-label);
    background: transparent;
  }
  .bhs-field .bhs-form-input:focus + .bhs-form-label { color: var(--bhs-green-btn); }
  .bhs-field.is-error .bhs-form-label { color: var(--bhs-error); }

  .bhs-field .bhs-form-input,
  .bhs-field .bhs-form-input:focus,
  .bhs-field .bhs-form-input:not(:placeholder-shown),
  .bhs-field .bhs-form-input.is-filled,
  .bhs-field .bhs-date,
  .bhs-lookup .bhs-form-input {
    order: 0;
    height: 52px;
    padding: 0 14px;
    font-size: 16px;
    line-height: 1.25;
  }
  .bhs-field select.bhs-form-input,
  .bhs-field select.bhs-form-input.is-filled,
  .bhs-field select.bhs-form-input:focus {
    padding: 0 40px 0 14px;
    background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
  }
  .bhs-field textarea.bhs-form-input,
  .bhs-field textarea.bhs-form-input.is-filled,
  .bhs-field textarea.bhs-form-input:focus {
    height: auto;
    padding: 12px 14px;
  }
  .bhs-field .bhs-tick,
  .bhs-field:has(select) .bhs-tick { top: 0; right: 0; width: 20px; height: 20px; }

  .bhs-form-fields { gap: 20px; }
  .bhs-options legend,
  .bhs-lookup__label { font-size: 15px; line-height: 1.35; color: var(--bhs-label); }
  .bhs-option { min-height: 52px; padding: 13px 48px 13px 14px; margin-bottom: 8px; align-items: center; }
  .bhs-option input { margin-top: 0; }
  .bhs-option .bhs-tick { top: 50%; margin-top: -11px; }
  .bhs-check { align-items: center; min-height: 52px; }
  .bhs-check input { margin-top: 0; }
  .bhs-form-title { margin-bottom: 12px; }
}

/* ==========================================================================
   ABN pick-your-business list (Brady 5:21am option A via DB). Round 2 tokens.
   ========================================================================== */
.bhs-picker {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  border: 1.5px solid var(--bhs-field-border);
  border-radius: var(--bhs-radius-input);
  background: var(--bhs-white);
  overflow: hidden;
}
.bhs-picker__option {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  min-height: 56px;
  padding: 10px 14px;
  border-top: 1px solid rgba(40, 40, 40, 0.1);
  cursor: pointer;
  line-height: 1.3;
}
.bhs-picker__option:first-child { border-top: 0; }
.bhs-picker__option:hover,
.bhs-picker__option.is-active {
  background: var(--bhs-panel);
  box-shadow: inset 3px 0 0 var(--bhs-green-btn);
}
.bhs-picker__name { font-weight: 700; color: var(--bhs-text); overflow-wrap: anywhere; }
.bhs-picker__meta { flex: 1 0 100%; font-size: 13px; color: var(--bhs-muted); font-variant-numeric: tabular-nums; }
.bhs-picker__tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 200px;
  background: var(--bhs-panel);
  color: var(--bhs-green-ink);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
}
.bhs-picker__tag--old { background: #fff6e5; color: #6b3e00; }
.bhs-lookup__status { margin: 8px 2px 0; font-size: 14px; line-height: 1.45; color: var(--bhs-text); }
.bhs-lookup__status:empty { display: none; }
.bhs-lookup[data-lookup-tone="busy"] .bhs-lookup__status { color: var(--bhs-muted); }
.bhs-lookup[data-lookup-tone="done"] .bhs-lookup__status {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--bhs-panel);
  color: var(--bhs-green-ink);
  font-weight: 600;
}
.bhs-lookup[data-lookup-tone="none"] .bhs-lookup__status,
.bhs-lookup[data-lookup-tone="unavailable"] .bhs-lookup__status {
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff6e5;
  color: #6b3e00;
  font-weight: 600;
}
@media (min-width: 901px) {
  .bhs-picker { max-height: 360px; overflow-y: auto; }
}
@media (hover: none) {
  .bhs-picker__option:hover:not(.is-active) { background: transparent; box-shadow: none; }
}

/* ==========================================================================
   Grouped short labels + Find intro lines (DB 5:40/5:47am).
   ========================================================================== */
.bhs-group {
  display: grid;
  gap: 22px;
  min-width: 0;
  margin: 8px 0 0;
  padding: 0;
  border: 0;
}
.bhs-group[hidden] { display: none; }
.bhs-group__title {
  float: left; /* lets the legend sit inside the grid flow */
  width: 100%;
  margin: 0 0 -8px;
  padding: 0;
  font-family: var(--bhs-font-heading);
  font-weight: 800;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--bhs-text);
}
.bhs-group__sub {
  margin: 4px 0 -10px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bhs-green-ink);
}
.bhs-same { cursor: pointer; }
.bhs-step-help--small {
  margin-top: -12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--bhs-muted);
}
.bhs-step-help--flag {
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff6e5;
  color: #6b3e00;
  font-weight: 600;
}
@media (max-width: 500px) {
  .bhs-group { gap: 20px; }
  .bhs-group__title { font-size: 18px; }
}

/* Build stamp (0555): small, quiet line under the copyright so we can tell which version a phone loaded. */
.bhs-build { max-width: 1425px; margin: 2px auto 0; font-size: 11px; line-height: 1.4; color: var(--bhs-footer-text, #EFEFEF); }

/* ==========================================================================
   Dark-green restyle, Build 0610 (DB 6:00am OK, Brady 5:44 restyle).
   ========================================================================== */
/* Welcome ring: a start arrow instead of a dash. */
.bhs-counter__ring .bhs-counter__icon { width: 26px; height: 26px; display: block; color: var(--bhs-gold); transform: none; }
/* Step list: numbers 1..N match "Step N of M" on phones; a tick replaces the number when done. */
.bhs-steps__num { font-size: 11px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.bhs-steps li.is-done .bhs-steps__num { display: none; }
/* Privacy and send: read-only copy of the Welcome tick. */
.bhs-check--readonly { cursor: default; background: var(--bhs-panel); }
.bhs-check--readonly input { opacity: 1; }
/* Mobile progress bar on the deep green header. */
@media (max-width: 900px) {
  .bhs-mobile-header__bar > span { background: var(--bhs-gold); }
  .bhs-mobile-header__step { color: var(--bhs-white); }
}
/* Review "Edit" is a full 44px tap target on desktop too (0610 QA). */
.bhs-review-edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  margin: -14px -10px -14px 0;
  padding: 0 10px;
}
/* Grouped headings (0610 QA fix): WebKit drew the floated legend on top of the first field in
   the grid fieldset (iPhone 13 and SE). Block flow with sibling margins gives the same spacing
   in every engine. */
.bhs-group { display: block; }
.bhs-group > .bhs-group__title { float: none; display: block; margin: 0 0 14px; }
.bhs-group > :not(legend) + :not(legend) { margin-top: 22px; }
.bhs-group > .bhs-group__sub { margin-top: 26px; }
@media (max-width: 500px) {
  .bhs-group > :not(legend) + :not(legend) { margin-top: 20px; }
  .bhs-group > .bhs-group__sub { margin-top: 24px; }
}
/* A heading focused by script on a step change (for screen readers) shows no focus box. */
.bhs-form-step h1[tabindex="-1"]:focus { outline: none; }

/* Build 0620 (CO 6:15am second check). */
/* Saved chip: deep green with white text (7.61:1), not light mint. */
.bhs-saved { background: var(--bhs-deep, #12603A); color: #FFFFFF; }
/* Find: the privacy sentence sits under the fields so the intro is one line. */
.bhs-step-help--after { margin-top: 18px; }
/* Build 0735 (prepared, NOT deployed): Review labels easier to read at small size (CO 7:31, "GST" read as "CST").
   Source string is "GST registered" (U+0047). 13px stays; weight 600; colour #3d4a42 on white is 9.6:1. */
.bhs-review-label { font-size: 13px; font-weight: 600; letter-spacing: 0.01em; }
