/* The guided report form on phone pages, every brand. Tokens and logical
   properties only, so the same rules serve RTL. Own class names (grf-) because
   Bootstrap and static/style.css style bare .btn, label and .form-group differently.

   Bump ?v= in the three phonenumber_detail_* templates when this changes:
   /static/ is cached for a year. */

.grf { display: flex; flex-direction: column; gap: 18px; min-width: 0; color: var(--pl-ink); font-size: 16px; line-height: 1.45; text-align: start; }
.grf[hidden], .grf-sent[hidden] { display: none; }

.grf-title { margin: 0; font-family: var(--pl-display); font-weight: 600; font-size: 20px; line-height: 1.25; text-align: start; }
.grf-number { margin: 4px 0 18px; color: var(--pl-ink-3); font-size: 15px; }

.grf-progress { display: flex; flex-direction: column; gap: 8px; scroll-margin-top: 16px; }
.grf-progress-row { display: flex; align-items: center; justify-content: space-between; min-height: 44px; }
.grf-step-label { font-weight: 600; font-size: 14px; color: var(--pl-ink-2); }
.grf-bars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.grf-bar { height: 6px; border-radius: 3px; background: var(--pl-line-2); }
.grf-bar.is-on { background: var(--pl-accent); }

/* Only the current step shows. Step 1 is painted by the server, so upgrading adds
   nothing to the page; without JS the panel's <noscript> shows all of them. */
.grf-step { display: none; flex-direction: column; gap: 14px; min-width: 0; margin: 0; padding: 0; border: 0; }
.grf-step.is-current { display: flex; }

/* JS on but the script has not arrived, or never will: a tapped radio must still
   lead somewhere, so fall back to the whole form. */
.grf:not([data-report-ready]):has(input[type=radio]:checked) .grf-step { display: flex; }
.grf:not([data-report-ready]):has(input[type=radio]:checked) .grf-js { display: none; }

.grf-q { margin: 0; font-family: var(--pl-display); font-weight: 500; font-size: 18px; line-height: 1.3; color: var(--pl-ink); outline: none; }
.grf-q label { margin: 0; padding: 0; font: inherit; color: inherit; display: inline; }
.grf-legend { float: none; width: auto; margin: 0 0 12px; padding: 0; border: 0; font-size: inherit; }

.grf-options { display: flex; flex-direction: column; gap: 8px; }
.grf-option { position: relative; display: block; margin: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
/* Real radios, laid over their option so taps and assistive tech hit the input. */
.grf-option input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.grf-option-box { display: flex; align-items: center; gap: 12px; min-height: 56px; box-sizing: border-box; padding: 8px 12px; border: 1px solid var(--pl-line-3); border-radius: var(--pl-radius-sm); background: var(--pl-surface); color: var(--pl-ink-2); }
.grf-option:hover .grf-option-box { border-color: var(--pl-accent); }
/* Inset ring, not a thicker border: selecting must not nudge the label. */
.grf-option input:checked ~ .grf-option-box { border-color: var(--pl-accent); box-shadow: inset 0 0 0 1px var(--pl-accent); background: rgba(var(--pl-accent-rgb), .06); color: var(--pl-accent-ink); }
.grf-option input:focus-visible ~ .grf-option-box { outline: 2px solid var(--pl-accent-ink); outline-offset: 2px; }
.grf-icon { flex: none; }
.grf-option-text { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; color: var(--pl-ink); }
.grf-option-label { font-weight: 700; font-size: 16px; line-height: 1.25; }
.grf-option-hint { font-size: 14px; line-height: 1.3; color: var(--pl-ink-3); }

.grf-chip { display: inline-flex; align-self: flex-start; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--pl-accent); border-radius: 999px; background: rgba(var(--pl-accent-rgb), .06); color: var(--pl-accent-ink); font-weight: 600; font-size: 14px; }
.grf-chip span { color: var(--pl-ink); }
.grf-field { display: flex; flex-direction: column; gap: 6px; }
.grf-help { margin: 0; font-size: 14px; color: var(--pl-ink-3); }
.grf-textarea { display: block; width: 100%; box-sizing: border-box; padding: 12px; border: 1px solid var(--pl-line-3); border-radius: var(--pl-radius-sm); background: var(--pl-surface); font: inherit; color: var(--pl-ink); resize: vertical; }
.grf-textarea::placeholder { color: var(--pl-ink-3); opacity: 1; }
.grf-textarea:focus { border-color: var(--pl-accent); box-shadow: 0 0 0 3px var(--pl-accent-ring); outline: 2px solid transparent; }
.grf-counter { font-size: 13px; color: var(--pl-ink-3); text-align: end; }
.grf-actions { display: flex; flex-direction: column; gap: 14px; }

.grf-summary { margin: 0; border: 1px solid var(--pl-line); border-radius: var(--pl-radius-sm); background: var(--pl-surface-2); }
.grf-summary-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px; }
.grf-summary-row + .grf-summary-row { border-top: 1px solid var(--pl-line); }
.grf-summary-text { flex: 1 1 auto; min-width: 0; }
.grf-summary dt { font-size: 13px; font-weight: 400; color: var(--pl-ink-3); }
.grf-summary dd { margin: 0; overflow-wrap: anywhere; white-space: pre-line; }
.grf-summary-type { font-weight: 700; }
.grf-privacy { display: flex; gap: 8px; margin: 0; font-size: 14px; color: var(--pl-ink-2); }
.grf-privacy svg { flex: none; }
.grf-captcha[hidden] { display: none; }

.grf-btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 44px; box-sizing: border-box; padding: 8px 12px; border-radius: var(--pl-radius-sm); font: inherit; font-weight: 600; text-align: center; text-decoration: none; cursor: pointer; }
/* accent-ink, not accent: white on the AU teal is 3.9:1, under the 4.5 floor. */
.grf-btn-primary { min-height: 48px; border: 0; background: var(--pl-accent-ink); color: #fff; font-weight: 700; }
.grf-btn-primary:hover, .grf-btn-primary:focus { background: var(--pl-accent-ink); color: #fff; text-decoration: none; }
.grf-btn-secondary { border: 1px solid var(--pl-line-3); background: var(--pl-surface); color: var(--pl-ink); }
.grf-btn-secondary:hover, .grf-btn-secondary:focus { background: var(--pl-surface-2); color: var(--pl-ink); text-decoration: none; }
.grf-link { min-height: 44px; padding: 0 6px; border: 0; background: none; color: var(--pl-accent-ink); font: inherit; font-weight: 600; cursor: pointer; }
.grf-link:hover { text-decoration: underline; }
.grf-btn:focus-visible, .grf-link:focus-visible { outline: 2px solid var(--pl-accent-ink); outline-offset: 2px; }

.grf-sent { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; box-sizing: border-box; padding: 16px 0; text-align: center; }
.grf-sent .grf-title { outline: none; text-align: center; }
.grf-sent-icon { color: var(--pl-accent); }
.grf-sent p { margin: 0; color: var(--pl-ink-2); }
.grf-sent .grf-btn-primary { margin-top: 8px; }
