/* ============================================================================
   uando.css — Use & Occupancy package
   Extends portal.css. Nothing here overrides a portal.css rule; it only adds
   the form-specific pieces (section bars, checklist, print layout).
   Palette is inherited: navy #0a2c5e, green #006400, notice #fff3cd.
   ============================================================================ */

:root {
    --udt-navy:  #0a2c5e;
    --udt-blue:  #2e75b6;   /* the lighter blue used on the paper packet bars */
    --udt-green: #006400;
    --udt-red:   #b02a2a;
}

/* ---------- page heading ------------------------------------------------- */
.uo-pagehead {
    border-bottom: 3px solid var(--udt-navy);
    padding-bottom: .75rem;
    margin-bottom: 1.5rem;
}
.uo-pagehead h3 { color: var(--udt-navy); margin: 0; }
.uo-pagehead .uo-sub { color: #6c757d; font-size: .9rem; }

/* ---------- section bars (mirror the printed packet) --------------------- */
.uo-section {
    background: var(--udt-navy);
    color: #fff;
    padding: .5rem .9rem;
    border-radius: .35rem .35rem 0 0;
    font-weight: 600;
    font-size: 1rem;
    margin: 0;
}
.uo-section .uo-section-no {
    display: inline-block;
    min-width: 1.6rem;
    opacity: .75;
    font-weight: 400;
}
.uo-section-body {
    border: 1px solid #dee2e6;
    border-top: 0;
    border-radius: 0 0 .35rem .35rem;
    padding: 1.25rem;
    background: #fff;
    margin-bottom: 1.5rem;
}

/* lighter sub-bar, used inside a section */
.uo-subsection {
    background: var(--udt-blue);
    color: #fff;
    padding: .35rem .75rem;
    border-radius: .25rem;
    font-size: .9rem;
    font-weight: 600;
    margin: 1.25rem 0 .75rem;
}

/* ---------- callouts ----------------------------------------------------- */
.uo-warn {           /* the yellow-highlighted rules from the packet */
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    /* #9a6b00, not the #e0a800 this used to be. The left border is what marks
       the block as a warning, so WCAG 1.4.11 wants 3:1 against its background:
       #e0a800 on #fff3cd measures 1.94:1 and fails, #9a6b00 measures 4.23:1.
       Same hue, darker — it reads as the same design. */
    border-left: 4px solid #9a6b00;
    padding: .75rem 1rem;
    border-radius: .25rem;
    font-size: .92rem;
}
.uo-must {           /* the red "will be returned" language */
    color: var(--udt-red);
    font-weight: 600;
}
.uo-note {
    background: #f1f5fa;
    border-left: 4px solid var(--udt-navy);
    padding: .75rem 1rem;
    border-radius: .25rem;
    font-size: .92rem;
}

/* ---------- form field polish -------------------------------------------- */
.uo-section-body .form-label { font-weight: 600; font-size: .875rem; margin-bottom: .2rem; }
.uo-section-body .form-control,
.uo-section-body .form-select { font-size: .95rem; }
.req::after { content: " *"; color: var(--udt-red); font-weight: 700; }

/* ---------- use group picker (Section 3) --------------------------------- */
.uo-ug-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .35rem 1.5rem; }
@media (max-width: 767.98px) { .uo-ug-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 479.98px) { .uo-ug-grid { grid-template-columns: 1fr; } }

.uo-ug {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .3rem .5rem;
    border: 1px solid transparent;
    border-radius: .25rem;
}
.uo-ug:hover { background: #f1f5fa; }
.uo-ug.is-checked { background: #e7eef7; border-color: #b8cbe3; }
.uo-ug label { margin: 0; cursor: pointer; font-size: .95rem; flex: 1 1 auto; }
.uo-ug .uo-ug-sm { color: #6c757d; font-size: .8rem; }
.uo-ug .uo-ug-info {
    border: 0; background: none; color: var(--udt-navy);
    padding: 0 .15rem; line-height: 1; cursor: pointer; opacity: .55;
}
.uo-ug .uo-ug-info:hover { opacity: 1; }
.uo-ug .uo-star { color: var(--udt-red); font-weight: 700; }

#occBlock.is-disabled { opacity: .45; }

/* ---------- address typeahead (inc/property_block.cfm) ------------------- */
.uo-typeahead {
    position: absolute;
    z-index: 1000;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ced4da;
    border-top: 0;
    border-radius: 0 0 .35rem .35rem;
    box-shadow: 0 6px 14px rgba(0,0,0,.09);
    max-height: 17rem;
    overflow-y: auto;
}
.uo-typeahead-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    width: 100%;
    text-align: left;
    border: 0;
    background: none;
    padding: .5rem .75rem;
    border-bottom: 1px solid #f1f1f1;
    font-size: .93rem;
}
.uo-typeahead-item:last-child { border-bottom: 0; }
.uo-typeahead-item:hover,
.uo-typeahead-item:focus { background: #e7eef7; }
.uo-typeahead-item .uo-ta-pin {
    font-family: Consolas, "Courier New", monospace;
    font-size: .8rem;
    color: #6c757d;
    white-space: nowrap;
}
.uo-typeahead-empty { padding: .6rem .75rem; font-size: .9rem; color: #6c757d; }

.uo-parcel input[readonly] {
    background: #eef2f7;
    border-style: dashed;
    font-weight: 600;
}

/* ---------- square radios ------------------------------------------------
   The printed packet uses check boxes for mutually exclusive answers. Squaring
   off a real radio keeps that look while letting the BROWSER enforce the
   exclusivity — no JS to get wrong, and screen readers still announce it as a
   single-choice group.
   ------------------------------------------------------------------------- */
.uo-boxcheck .form-check-input[type="radio"] {
    border-radius: .15rem;
    width: 1.05rem;
    height: 1.05rem;
    margin-top: .2rem;
}
.uo-boxcheck .form-check-input[type="radio"]:checked {
    background-color: var(--udt-navy);
    border-color: var(--udt-navy);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
}
.uo-boxcheck { padding: .25rem .25rem .25rem 1.9rem; }
.uo-boxcheck label { cursor: pointer; }

/* ---------- package checklist -------------------------------------------- */
.uo-check-item {
    display: flex; align-items: center; gap: .75rem;
    padding: .7rem .25rem;
    border-bottom: 1px solid #eee;
}
.uo-check-item:last-child { border-bottom: 0; }
.uo-check-icon { width: 1.6rem; text-align: center; font-size: 1.1rem; }
.uo-check-done   .uo-check-icon { color: var(--udt-green); }
.uo-check-todo   .uo-check-icon { color: #adb5bd; }
.uo-check-needed .uo-check-icon { color: #e0a800; }
.uo-check-body { flex: 1 1 auto; }
.uo-check-body .uo-check-title { font-weight: 600; }
.uo-check-body .uo-check-meta  { font-size: .82rem; color: #6c757d; }

/* ---------- guides ------------------------------------------------------- */
.uo-guide-group { border-left: 4px solid var(--udt-navy); padding-left: 1rem; margin-bottom: 1.5rem; }
.uo-guide-group h5 { color: var(--udt-navy); margin-bottom: .35rem; }
.uo-guide-examples { columns: 2; column-gap: 2rem; font-size: .9rem; margin-bottom: 0; }
@media (max-width: 575.98px) { .uo-guide-examples { columns: 1; } }
.uo-guide-examples li { break-inside: avoid; }
.uo-guide-cond { background: #f8f9fa; border-radius: .25rem; padding: .6rem .9rem; font-size: .88rem; margin-top: .6rem; }

.uo-jump { position: sticky; top: 1rem; }
.uo-jump .list-group-item { padding: .35rem .75rem; font-size: .88rem; }

/* ---------- package number chip ------------------------------------------ */
.uo-pkgno {
    font-family: Consolas, "Courier New", monospace;
    font-size: 1.15rem;
    letter-spacing: .04em;
    background: #fff;
    border: 2px dashed var(--udt-navy);
    color: var(--udt-navy);
    padding: .35rem .85rem;
    border-radius: .35rem;
    display: inline-block;
}

/* ---------- print -------------------------------------------------------- */
.uo-printhead { display: none; }

@media print {
    body { background: #fff; font-size: 11pt; }
    .d-print-none, .top-navbar, footer, .uo-jump, .btn { display: none !important; }
    .uo-printhead {
        display: block;
        border-bottom: 2px solid #000;
        padding-bottom: .35rem;
        margin-bottom: 1rem;
    }
    .uo-printhead strong { font-size: 13pt; }
    .container { max-width: 100% !important; width: 100% !important; }
    .card, .uo-section-body { border: 1px solid #999 !important; box-shadow: none !important; }
    .uo-section {
        background: #0a2c5e !important;
        color: #fff !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .uo-section-body { page-break-inside: avoid; }
    .uo-guide-group { page-break-inside: avoid; }
    a[href]::after { content: ""; }
}

/* ---------------------------------------------------------------------------
   Section 2 option help text.

   Not Bootstrap's .text-muted (#6c757d): at this size that lands at 4.69:1 on
   white, which passes but leaves no headroom. #5c6672 is 5.84:1 and reads as
   the same gray.
   --------------------------------------------------------------------------- */
.uo-opt-help {
    display: block;
    color: #5c6672;
    font-size: .8rem;
    line-height: 1.35;
    margin-top: .2rem;
    font-weight: 400;
}

/* ---------------------------------------------------------------------------
   Section 2 option title.

   Its own class rather than .uo-boxcheck label, because .uo-boxcheck is also
   Section 6's Yes / No and those do not want the same weight.

   The weight is doing real work here: each option now carries a line of help
   text under it, and without a weight difference the two run together.
   --------------------------------------------------------------------------- */
.uo-opt-title {
    font-weight: 600;
    color: #212529;
}

/* The chosen option, marked in JS rather than :has() so older browsers behave
   the same. Eight two-line options in a grid are easy to lose your place in.
   #212529 on #eef2f7 is 13.7:1 and the help gray #5c6672 is 5.2:1 — both clear
   AA with room. */
.uo-boxcheck.is-picked {
    background: #eef2f7;
    border-radius: .35rem;
    box-shadow: inset 3px 0 0 var(--udt-navy);
}

/* A locked Number of Units. Grayed so it reads as derived rather than broken,
   but still clearly a value: #212529 on #eef2f7 is 13.7:1. */
.uo-locked {
    background-color: #eef2f7;
    cursor: not-allowed;
}

/* ---------- fee bar ------------------------------------------------------ */
.uo-fee-bar {
    border: 1px solid #c9d4e2;
    border-left: 4px solid var(--udt-navy);
    border-radius: .4rem;
    margin: 1.25rem 0;
    overflow: hidden;
}
.uo-fee-head {
    display: flex; flex-wrap: wrap; gap: .5rem;
    align-items: center; justify-content: space-between;
    background: #eef2f7;
    padding: .55rem .9rem;
    color: #212529;
}
/* #8a5a00 on #eef2f7 is 5.5:1. Bootstrap's warning yellow would be 2:1. */
.uo-fee-status { font-size: .82rem; font-weight: 600; color: #8a5a00; }
.uo-fee-body   { padding: .85rem .9rem; font-size: .88rem; }

.uo-fee-details > summary {
    cursor: pointer; font-weight: 600; color: var(--udt-navy);
    padding: .35rem 0; list-style-position: inside;
}
.uo-fee-details > summary:focus-visible { outline: 3px solid var(--udt-navy); outline-offset: 2px; }

.uo-fee-group      { margin-top: .75rem; }
.uo-fee-group-name { font-weight: 600; color: #212529; }
.uo-fee-group-note { font-size: .8rem; color: #5c6672; margin-bottom: .15rem; }
.uo-fee-table td   { padding: .25rem .4rem; }
.uo-fee-notes      { margin: .9rem 0 0; padding-left: 1.1rem; font-size: .8rem; color: #5c6672; }
.uo-fee-notes li   { margin-bottom: .2rem; }

/* ---------------------------------------------------------------------------
   Live fee panel

   Three states, set as data-state on .uo-fee-live by the script in
   uo_application.cfm: empty (not enough entered yet), blocked (cannot be
   priced), ok (a real figure).

   State is carried by a LEFT BORDER and by the caption text, never by color
   alone. Color is the least reliable channel here -- this project's own
   palette was chosen by someone with a color vision deficiency, and roughly
   one man in twelve reading this form has one too. WCAG 1.4.1 says the same
   thing more formally.
   --------------------------------------------------------------------------- */
.uo-fee-live {
    display: flex; gap: 1rem; align-items: flex-start; flex-wrap: wrap;
    padding: .8rem .9rem; margin-bottom: .75rem;
    background: #fff; border: 1px solid #d6dbe1; border-left: 5px solid #7e8998;
    border-radius: 4px;
}
/* The left border is a state indicator, so it is held to WCAG 1.4.11's 3:1 for
   non-text content: #7e8998 is 3.55:1 on white, where the #98a2ae it replaced
   was 2.59:1 and would have failed. The 1px #d6dbe1 outline is decorative -- it
   carries no state, the left border and the caption do -- so it is exempt. */
.uo-fee-live[data-state="ok"]      { border-left-color: #1a7f37; background: #f6fbf7; }
.uo-fee-live[data-state="blocked"] { border-left-color: #b42318; background: #fff7f6; }

.uo-fee-amount-wrap  { min-width: 8.5rem; }
.uo-fee-amount-label {
    font-size: .72rem; font-weight: 700; letter-spacing: .04em;
    text-transform: uppercase; color: #5c6672;
}
.uo-fee-amount {
    font-size: 1.9rem; font-weight: 700; line-height: 1.1; color: var(--udt-navy);
    font-variant-numeric: tabular-nums;
}
.uo-fee-live[data-state="ok"] .uo-fee-amount { color: #14532d; }
/* No figure yet: shrink the placeholder so a lone dash does not sit there at
   1.9rem looking like an amount someone should read. */
.uo-fee-live:not([data-state="ok"]) .uo-fee-amount { font-size: 1.15rem; color: #5c6672; }

.uo-fee-detail  { flex: 1 1 16rem; min-width: 14rem; }
.uo-fee-caption { margin: 0; font-size: .85rem; color: #3d4650; }

.uo-fee-lines      { list-style: none; margin: .5rem 0 0; padding: 0; font-size: .82rem; }
.uo-fee-lines li   {
    display: flex; justify-content: space-between; gap: 1rem;
    padding: .18rem 0; border-top: 1px solid #e6eaee;
}
.uo-fee-lines li:first-child { border-top: 0; }
.uo-fee-line-label { color: #3d4650; }
.uo-fee-line-amt   { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }

.uo-fee-foot { font-size: .84rem; color: #3d4650; }

/* Print the schedule open rather than as a collapsed control. */
@media print {
    .uo-fee-details > summary { display: none; }
    .uo-fee-details[open], .uo-fee-details { display: block; }
}

/* ---------------------------------------------------------------------------
   Editable page text (.uo-content)

   Wraps whatever comes out of dbo.NLPS_FormText. Every attribute is stripped
   by htmlclean.cfc before it reaches here, so the markup is bare tags and the
   styling is entirely this block's job. That is the point: staff decide what
   the text SAYS, this file decides what it LOOKS like, and neither can break
   the other.

   blockquote is the callout — what the yellow inline highlight used to do.
   The editor has a "Notice" button that produces it, so nobody has to type a
   color, and the color can be changed here for every page at once.
   --------------------------------------------------------------------------- */
.uo-content > *:first-child { margin-top: 0; }
.uo-content > *:last-child  { margin-bottom: 0; }
.uo-content p  { margin-bottom: 1rem; }
.uo-content ul,
.uo-content ol { margin-bottom: 1rem; padding-left: 1.4rem; }
.uo-content li { margin-bottom: .3rem; }

.uo-content blockquote {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-left: 4px solid #9a6b00;   /* 4.6:1 on the panel — a state marker, so WCAG 1.4.11 applies */
    padding: .75rem 1rem;
    margin: 0 0 1rem;
    border-radius: .25rem;
    font-size: .92rem;
}
.uo-content blockquote > *:last-child { margin-bottom: 0; }

.uo-content a          { color: #0a4a86; text-decoration: underline; }
.uo-content a:hover    { color: #06325b; }

@media print {
    .uo-content blockquote { background: none; border-left: 3px solid #000; }
}

/* ---------- featured service card ----------------------------------------
   The U&O tile on index.cfm. Everything else on that page is navy, so the
   one action we actually want people to take was invisible among its
   neighbors. Teal breaks from the navy without using red or yellow, and
   stays clear of the #006400 already on Pay Now so the two are not
   competing to be "the button".
   The icon and heading are tinted too, not just the button, so the whole
   tile reads as one unit rather than a white card with a colored strip.
   -------------------------------------------------------------------------- */
.uo-card-feature {
    background: #e6f4f1;
    border: 1px solid #0f766e !important;
}
.uo-card-feature h5,
.uo-card-feature .uo-feature-icon { color: #0f766e; }
.uo-card-feature .uo-must { color: #134e4a; }

.btn-uo-feature {
    background: #0f766e;
    border-color: #0f766e;
    color: #fff;
}
.btn-uo-feature:hover,
.btn-uo-feature:focus {
    background: #0b5c56;
    border-color: #0b5c56;
    color: #fff;
}
.btn-uo-feature:focus-visible {
    outline: 3px solid #99f6e4;
    outline-offset: 2px;
}

/* ---------- a checkbox inside a note box ----------------------------------
   .form-check pulls its input LEFT by 1.5em (Bootstrap's negative margin) and
   compensates with its own padding-left. .uo-note then sets padding-left of
   its own, which wins the cascade -- so the compensation disappears while the
   negative margin stays, and the checkbox lands ON the note's 4px left border,
   where the border paints over it. It was not merely misaligned: it was
   invisible, and the label looked like plain text nobody could tick.

   2.5rem is 1.5em of pull plus a clear gap, measured against the live page:
   the input ends up 22px inside the border instead of 3px outside it.
   -------------------------------------------------------------------------- */
.uo-note.form-check {
    padding-left: 2.5rem;
}

/* ---------- a CHOICE, not a note ------------------------------------------
   This box asks the applicant to decide something that changes how the form
   behaves. Styled as a .uo-note it read as one more gray information panel,
   sitting directly under two actual information panels, and people skimmed
   straight past it - which would have cost them the deferred-dates option
   without ever knowing it existed.

   Distinguished four ways, deliberately not just by color:
     - a heavier border and a tinted ground, so the block reads as separate
     - the teal already established on index.cfm as "something you do"
     - a checkbox sized up from Bootstrap's default, which is tiny next to a
       two-line label
     - its own vertical space, so it is not crowded by the notes above

   The whole label is clickable, so the hit target is the sentence rather than
   a 15px square.
   -------------------------------------------------------------------------- */
.uo-choice {
    background: #e6f4f1;
    border: 1px solid #0f766e;
    border-left-width: 6px;
    border-radius: .375rem;
    padding: 1rem 1.1rem 1rem 3.1rem;
    margin: 1.5rem 0;
}
.uo-choice .form-check-input {
    width: 1.3em;
    height: 1.3em;
    margin-left: -2.1rem;
    margin-top: .05em;
    border: 1px solid #0f766e;
    cursor: pointer;
}
.uo-choice .form-check-input:checked {
    background-color: #0f766e;
    border-color: #0f766e;
}
.uo-choice .form-check-input:focus {
    border-color: #0f766e;
    box-shadow: 0 0 0 .25rem rgba(15, 118, 110, .25);
}
.uo-choice .form-check-label {
    cursor: pointer;
    color: #134e4a;
}
.uo-choice .form-check-label strong { color: #0f766e; }

/* ---------- attestation (the electronic signature) -----------------------
   Same shape as .uo-choice, different job. .uo-choice is an informational
   option the applicant may or may not want; this is the one box the form
   cannot be submitted without, and it was being scrolled straight past.

   Red rather than the teal of .uo-choice, and a heading of its own, so it
   reads as a required action rather than another thing to consider. Reserved
   for this one control - if it starts appearing elsewhere it stops standing
   out, which is the whole point of it.

   Contrast, same rule .uo-warn documents (WCAG 1.4.11 wants 3:1 for a border
   that carries meaning): the #b02a2a left border against the #fdf6f6 panel
   measures about 7:1, and the heading text in the same red on that panel
   about 6.9:1, so both clear AA comfortably.

   Checked state turns GREEN deliberately - red says "you still have to do
   this", green says "done", and that flip is what a returning eye looks for
   when scanning back up a long form.
   ------------------------------------------------------------------------- */
.uo-attest {
    background: #fdf6f6;
    border: 1px solid #e3bcbc;
    border-left: 6px solid var(--udt-red);
    border-radius: .375rem;
    padding: 1rem 1.1rem 1rem 3.1rem;
    margin: 1.75rem 0 .5rem;
}
.uo-attest-head {
    margin: 0 0 .45rem -2rem;
    color: var(--udt-red);
    font-weight: 700;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.uo-attest .form-check-input {
    width: 1.45em;
    height: 1.45em;
    margin-left: -2.25rem;
    margin-top: .05em;
    border: 2px solid var(--udt-red);
    cursor: pointer;
}
.uo-attest .form-check-input:checked {
    background-color: var(--udt-green);
    border-color: var(--udt-green);
}
.uo-attest .form-check-input:focus {
    border-color: var(--udt-red);
    box-shadow: 0 0 0 .25rem rgba(176, 42, 42, .25);
}
.uo-attest .form-check-label {
    cursor: pointer;
    font-size: .95rem;
}
/* Once ticked the panel calms down: the job is done and it should stop
   competing with whatever the applicant still has left to fill in. */
.uo-attest:has(.form-check-input:checked) {
    background: #f2f8f2;
    border-color: #bcd9bc;
    border-left-color: var(--udt-green);
}
.uo-attest:has(.form-check-input:checked) .uo-attest-head { color: var(--udt-green); }

/* Section 2 / 3 options locked out by the property type (Single / Duplex / Triplex) */
.uo-ug-off, .uo-opt-off { opacity: .45; }
.uo-ug-off label, .uo-opt-off label { cursor: not-allowed; }

/* ---- Activity on this package (/inc/activity_panel.cfm) ---- */
.ac-list { list-style: none; margin: 0; padding: 0; }
.ac-item { display: flex; gap: 1rem; padding: .45rem 0; border-bottom: 1px solid #eef1f5; font-size: .92rem; }
.ac-item:last-child { border-bottom: 0; }
.ac-when { flex: 0 0 11.5rem; color: #5b6573; white-space: nowrap; }
.ac-time { color: #8a94a6; font-size: .85em; margin-left: .25rem; }
.ac-what strong { color: var(--udt-navy, #0a2c5e); font-weight: 600; }
.ac-text { display: block; color: #3d4652; }
.ac-tag  { display: inline-block; margin-left: .4rem; font-size: .72rem; font-weight: 600; padding: .05rem .4rem; border-radius: .3rem; background: #e6ecf5; color: var(--udt-navy, #0a2c5e); vertical-align: middle; }
.ac-cmis .ac-what strong { color: #1b5e20; }
@media (max-width: 575px) { .ac-item { flex-direction: column; gap: .1rem; } .ac-when { flex: none; } }
