/* ============================================================================
   questionnaire.css - the client questionnaire (baseline.js)
   ============================================================================
   Modelled on the Financial Health Network's own survey form: a white sheet
   with a soft shadow, one question per screen, a blue eyebrow, the question
   in large gray type, an italic "Select One:" line under a hairline, big
   native radio buttons and checkboxes, gray label boxes beside square
   black-bordered text inputs, and Previous / Next Question buttons under a
   second hairline. Values are taken from that stylesheet.
   ========================================================================== */

.q-wrap {
    position: relative;
    max-width: 960px;
    margin: 24px auto 0;
    padding: 30px;
    background-color: #FFFFFF;
    box-shadow: rgba(0, 0, 0, 0.1) 0 0 10px 10px;
    color: #424448;
    font-family: "Open Sans", sans-serif;
    font-size: 16px;
    line-height: 24px;
}
@media (max-width: 600px) {
    .q-wrap { padding: 20px; margin-top: 12px; box-shadow: rgba(0, 0, 0, 0.08) 0 0 8px 4px; }
}

/* Thin light-blue bar across the top: how far along you are. */
.q-progress { height: 5px; margin: -30px -30px 22px; background-color: #F4F4F4; }
@media (max-width: 600px) { .q-progress { margin: -20px -20px 18px; } }
.q-progress__bar { height: 100%; background: linear-gradient(90deg, #6DB1E0 0%, #A8D4F2 100%); transition: width 0.2s ease-out; }

.q-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.q-count { font-size: 14px; color: #63666A; }
.q-preview { margin: 16px 0 0; padding: 10px 14px; background-color: #F7F7F7; font-size: 14px; line-height: 21px; color: #424448; }

.q-slide { animation: q-in 0.2s ease-out; }
@keyframes q-in { from { opacity: 0; transform: translateX(50px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .q-slide { animation: none; } }

.q-eyebrow { margin: 26px 0 6px; font-size: 19.2px; line-height: 1.45; color: #0077C8; font-weight: 400; }
.q-text { margin: 4px 0 15px; font-size: 19.2px; line-height: 25.6px; color: #424448; }
.q-text:focus { outline: none; }
.q-intro { margin: 8px 0 0; font-size: 16px; line-height: 24px; color: #63666A; }
.q-body { margin: 0 0 15px; font-size: 16px; line-height: 24px; color: #424448; max-width: 800px; }
.q-help { margin: -4px 0 15px; font-size: 14px; line-height: 21px; color: #63666A; max-width: 800px; }
.q-foot { margin: 15px 0 0; font-size: 13px; line-height: 19px; color: #97999B; }

.q-answers-title {
    margin: 0 0 7.5px;
    padding-top: 15px;
    border-top: 1px solid #D9D9D6;
    font-style: italic;
    color: #424448;
}

/* Options: one per line, native controls at 25px, as on the reference. */
.q-answers { display: block; }
.q-answers .wb-options { display: block; }
.q-row { display: block; }
.q-opt {
    display: inline-flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 15px;
    padding-left: 5px;
    font-size: 16px;
    line-height: 24px;
    color: #424448;
    cursor: pointer;
    max-width: 100%;
}
.q-opt input {
    flex: none;
    width: 25px;
    height: 25px;
    margin: 0;
    accent-color: auto;
    cursor: pointer;
}
.q-opt span { padding-top: 1px; }
.q-opt:has(input:checked) span { color: #002843; }

/* Text answers: gray label box on the left, square black input on the right. */
.q-fields { margin: 0 0 8px; }
.q-field { display: flex; align-items: center; max-width: 800px; margin: 0 0 15px; }
.q-field > span {
    flex: 1 1 0;
    margin-right: 7.5px;
    padding: 10px;
    text-align: right;
    background-color: #F7F7F7;
    color: #424448;
}
.q-field input, .q-input {
    flex: 3 1 0;
    min-width: 0;
    height: 44px;
    padding: 10px;
    font-family: inherit;
    font-size: 16px;
    color: #000000;
    background-color: #FFFFFF;
    border: 1px solid #000000;
    border-radius: 0;
    box-sizing: border-box;
}
.q-field input:focus, .q-input:focus { outline: 2px solid #0077C8; outline-offset: 1px; }
[dir="rtl"] .q-field > span { margin-right: 0; margin-left: 7.5px; text-align: left; }
@media (max-width: 560px) {
    .q-field { flex-direction: column; align-items: stretch; }
    .q-field > span { margin: 0 0 6px; text-align: left; }
    .q-field input { flex: none; width: 100%; }
}

.q-error { margin: 0 0 5px; font-size: 14.4px; font-style: italic; color: #FF0000; }
.q-error[hidden] { display: none; }

.q-prevnext {
    display: flex;
    flex-wrap: wrap;
    gap: 0 15px;
    margin-top: 7.5px;
    padding-top: 15px;
    border-top: 1px solid #D9D9D6;
}
.q-prevnext .q-btn { margin-top: 7.5px; }
.q-status { margin: 10px 0 0; font-size: 14px; color: #63666A; min-height: 1em; }
.q-status:empty { display: none; }
.q-privacy { margin: 40px 0 0; font-size: 13px; }
.q-privacy a { color: #63666A; }

/* Buttons: the reference's .btn-primary and its outlined "Previous". */
.q-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 30px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    line-height: 20.8px;
    border: 1px solid transparent;
    border-radius: 3px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.q-btn--primary { background-color: #0077C8; color: #FFFFFF; }
.q-btn--primary:hover { background-color: #005E9F; }
.q-btn--primary:disabled { opacity: 0.5; cursor: not-allowed; }
.q-btn--outline { background-color: transparent; color: #248AD0; border-color: #248AD0; }
.q-btn--outline:hover { background-color: #248AD0; color: #FFFFFF; }
.q-btn--sm { padding: 6px 18px; font-size: 14px; }
[dir="rtl"] .q-btn svg { transform: scaleX(-1); }

/* Finished screen. */
.q-done .ci-code-eyebrow { margin: 22px 0 6px; padding-top: 15px; border-top: 1px solid #D9D9D6; font-style: italic; font-size: 16px; color: #424448; text-transform: none; letter-spacing: 0; font-weight: 400; }
.q-done .ci-code-value {
    display: inline-block;
    margin: 0 0 15px;
    padding: 12px 18px;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #002843;
    border: 1px solid #000000;
}
.q-done .ci-desc { margin: 0 0 15px; font-size: 16px; line-height: 24px; color: #424448; max-width: 800px; }
.q-done .od-share-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.q-done .ci-code-btn { margin: 0; }
.q-done .ci-fine { font-size: 14px; color: #63666A; }

@media print {
    .q-wrap { box-shadow: none; padding: 0; }
    .q-progress, .q-prevnext, .q-top { display: none; }
}

/* The CFPB statements are drawn by wellbeing.js with its own classes; inside
   the questionnaire they take the same look as every other question. */
.q-slide .wb-item { margin: 0; padding: 0; border: 0; }
.q-opt .wb-option-label { font-size: 16px; line-height: 24px; color: inherit; font-weight: 400; }
.q-opt:has(input:checked) .wb-option-label { color: #002843; font-weight: 400; }
.q-opt.wb-option, .q-slide .q-opt { border: 0; background: none; padding: 0 0 0 5px; outline: none; }

/* Several questions on one screen: space between them, and a flag on any
   left blank after Next was pressed. */
.q-unit + .q-unit { margin-top: 26px; }
.q-unit.is-missing .q-text { color: #C00000; }
.q-miss { margin-top: -6px; }


/* ============================================================================
   Fee Comparison Tool in the same format (calc-steps.js moves the inputs into
   .calc-sheet). Everything below is scoped to the sheet, so the results
   report under it keeps its own layout.
   ========================================================================== */
.cw-hide { display: none !important; }
.calc-sheet { max-width: 960px; margin: 24px auto 0; }
@media (max-width: 1000px) { .calc-sheet { margin-left: 16px; margin-right: 16px; } }
.calc-sheet .calc-title { margin: 0; font-size: 19.2px; line-height: 1.45; color: #0077C8; font-weight: 400; }
.calc-sheet .q-top { margin-bottom: 8px; }
.calc-sheet .calc-optional { margin: 0 0 4px; }

/* Flatten the page's own layout boxes inside the sheet. */
.calc-sheet .shell { max-width: none; margin: 0; padding: 0; }
.calc-sheet .bg-bg { background: none; padding: 0; }
.calc-sheet .calc-card { border: 0; border-radius: 0; box-shadow: none; padding: 0; background: none; }
.calc-sheet .calc-card::before { display: none; }
.calc-sheet form > .shell:first-child { display: none; }          /* "Part one" strip */
.calc-sheet form .sticky { display: none; }                       /* old Run bar */
.calc-sheet .split { display: block; }
.calc-sheet .calc-section { padding: 0; border: 0 !important; margin: 0; }
.calc-sheet .lg\:sticky { position: static; }
.calc-sheet .setup-grid { display: block; }
.calc-sheet .panel, .calc-sheet .setup-box { border: 0; border-radius: 0; padding: 0; background: none; box-shadow: none; }
.calc-sheet .setup-box + .setup-box { margin-top: 26px; }

/* Section heading = the question text; its blurb = body text. */
.calc-sheet .calc-section > div:first-child { margin-bottom: 4px; }
.calc-sheet .calc-section .ident { display: none; }
.calc-sheet h2, .calc-sheet h3 { font-size: 19.2px !important; line-height: 25.6px; font-weight: 400 !important; color: #424448 !important; margin: 18px 0 10px; }
.calc-sheet .calc-section > div:first-child p { margin: 0 0 15px !important; font-size: 16px; line-height: 24px; color: #424448; }
.calc-sheet .setup-note, .calc-sheet .field-why, .calc-sheet .text-xs { font-size: 14px !important; line-height: 21px; color: #63666A !important; }
.calc-sheet .max-w-\[640px\] { max-width: 800px; }

/* Group labels ("Money orders") as the reference's italic line under a rule. */
.calc-sheet legend, .calc-sheet .label-soft {
    display: block; width: 100%;
    margin: 0 0 7.5px !important; padding-top: 15px;
    border-top: 1px solid #D9D9D6;
    font-style: italic; font-weight: 400; font-size: 16px; color: #424448 !important;
}
.calc-sheet fieldset { border: 0; padding: 0; margin: 0; }
.calc-sheet fieldset.pt-7 { padding-top: 10px; border-top: 0; }

/* Field labels and inputs: plain labels, square black-bordered boxes. */
.calc-sheet label.block, .calc-sheet span.block { font-size: 16px !important; font-weight: 400 !important; color: #424448 !important; margin-bottom: 6px !important; }
.calc-sheet .fld, .calc-sheet select, .calc-sheet input[type="text"], .calc-sheet input[type="number"] {
    min-height: 44px; height: 44px;
    padding-top: 8px; padding-bottom: 8px;
    font-family: inherit; font-size: 16px !important; color: #000000;
    background-color: #FFFFFF;
    border: 1px solid #000000 !important;
    border-radius: 0 !important;
    box-shadow: none;
}
.calc-sheet .fld:focus, .calc-sheet select:focus, .calc-sheet input:focus { outline: 2px solid #0077C8; outline-offset: 1px; box-shadow: none; }

/* Yes / No and other choice groups: the page hides its radio inputs and
   draws pills; here they become real 25px radio buttons, one per line. */
.calc-sheet .seg { display: block; padding: 0; border: 0; background: none; border-radius: 0; gap: 0; }
.calc-sheet .seg > label { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 15px; padding-left: 5px; cursor: pointer; width: fit-content; max-width: 100%; }
.calc-sheet .seg input.sr-only {
    position: static !important; width: 25px !important; height: 25px !important;
    margin: 0 !important; padding: 0 !important; overflow: visible !important;
    clip: auto !important; white-space: normal !important; flex: none;
    accent-color: auto; cursor: pointer;
}
.calc-sheet .seg .seg-label {
    display: inline; min-height: 0; padding: 1px 0 0; border-radius: 0;
    font-size: 16px; line-height: 24px; font-weight: 400;
    letter-spacing: 0; text-transform: none; white-space: normal;
    color: #424448 !important; background: none !important;
}
.calc-sheet .seg input:checked + .seg-label { color: #002843 !important; background: none !important; }
.calc-sheet .seg-scale { display: block; min-width: 0; }
.calc-sheet .seg-scale label { flex: none; }

/* Indented follow-up fields (shown when "Yes" is picked). */
.calc-sheet .border-l-2 { border-left: 3px solid #D9D9D6 !important; }

/* The well-being check inside the sheet. */
.calc-sheet #wellbeingForm { padding: 0; }
.calc-sheet .seg .seg-label { border: 0 !important; box-shadow: none !important; }
body.calc-stepped #publicStatsPanel { max-width: 960px; margin: 24px auto 0; padding: 0; }
@media (max-width: 1000px) { body.calc-stepped #publicStatsPanel { margin-left: 16px; margin-right: 16px; } }
.calc-sheet .calc-section > div:first-child { width: auto !important; max-width: 800px; }
.calc-sheet .calc-section > div:first-child p { margin-left: 0 !important; max-width: 800px; }

/* Quick check-in (checkin.js + wellbeing.js) inside the sheet: same look as
   the client questionnaire - no boxes, native 25px controls, one per line. */
.calc-sheet .ci-card, .calc-sheet .wb-card, .calc-sheet .ci-consent {
    border: 0 !important; border-radius: 0; box-shadow: none; background: none; padding: 0; margin: 0 0 26px;
}
.calc-sheet .ci-title, .calc-sheet .wb-title { font-size: 19.2px !important; line-height: 25.6px; font-weight: 400 !important; color: #424448 !important; margin: 18px 0 10px; }
.calc-sheet .ci-desc, .calc-sheet .wb-desc, .calc-sheet .ci-fine { font-size: 16px; line-height: 24px; color: #424448; max-width: 800px; }
.calc-sheet .ci-fine { font-size: 14px; color: #63666A; }
.calc-sheet .wb-eyebrow { font-size: 19.2px; color: #0077C8; text-transform: none; letter-spacing: 0; font-weight: 400; }
.calc-sheet .ci-item, .calc-sheet .wb-item { border: 0; padding: 0; margin: 0 0 18px; }
.calc-sheet .ci-item-text, .calc-sheet .wb-item-text, .calc-sheet .wb-block-prompt {
    display: block; width: 100%; margin: 0 0 7.5px; padding-top: 15px; border-top: 1px solid #D9D9D6;
    font-size: 16px; line-height: 24px; font-style: italic; font-weight: 400; color: #424448;
}
.calc-sheet .wb-block-lead { font-size: 14px; color: #63666A; }
.calc-sheet .ci-options, .calc-sheet .ci-scale, .calc-sheet .wb-options { display: block; }
.calc-sheet .ci-option, .calc-sheet .wb-option, .calc-sheet .ci-consent-label {
    display: flex; align-items: flex-start; gap: 10px; width: fit-content; max-width: 100%;
    margin: 0 0 15px; padding: 0 0 0 5px; border: 0 !important; background: none !important; outline: none;
    border-radius: 0; cursor: pointer;
}
.calc-sheet .ci-radio, .calc-sheet .wb-radio, .calc-sheet .ci-checkbox { width: 25px; height: 25px; margin: 0; flex: none; accent-color: auto; }
.calc-sheet .ci-option-label, .calc-sheet .wb-option-label, .calc-sheet .ci-consent-text {
    font-size: 16px; line-height: 24px; font-weight: 400; color: #424448; padding-top: 1px;
}
.calc-sheet .ci-option:has(input:checked) .ci-option-label,
.calc-sheet .wb-option:has(input:checked) .wb-option-label { color: #002843; font-weight: 400; }
.calc-sheet #wellbeingForm .btn-primary-fin { padding: 10px 30px; min-height: 0; line-height: 20.8px; }
.calc-sheet #wellbeingForm .btn-secondary-fin { background: transparent; color: #248AD0; border: 1px solid #248AD0; }
