/* InspectionRequestForm.aspx - page-specific styles.
   Builds on css/application-redesign.css (.app-redesign hero, cards, form controls, buttons, palette variables).
   Everything is scoped to .irf-page so no other page is affected.
   Revert: restore InspectionRequestForm.aspx.bak-20261030-redesign (and the .cs / .js backups) and remove the link to this file. */

/* premiere2.css collapses .hidden to 0x0 + visibility:hidden; these panels are toggled with that class from code-behind, so remove them from layout outright. */
.irf-page .hidden { display: none !important; }

/* ---------- Steps ---------- */
.irf-page .irf-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 24px; padding: 0; list-style: none; }
.irf-page .irf-steps li {
    display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: #fff; border: 1px solid #dbe5e0; border-radius: 14px;
    font-weight: 700; font-size: 15px; line-height: 1.35; color: #3a4a5c;
}
.irf-page .irf-step-num { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: #e8eeeb; color: #3a4a5c; font-size: 14px; font-weight: 800; }
.irf-page .irf-steps li[aria-current="step"] { border-color: var(--green); background: #f1f8f4; box-shadow: 0 0 0 3px var(--ar-ring); color: var(--green-dark); }
.irf-page .irf-steps li[aria-current="step"] .irf-step-num { background: var(--green); color: #fff; }
.irf-page .irf-steps li.is-complete { border-color: var(--green-light); color: var(--green-dark); }
.irf-page .irf-steps li.is-complete .irf-step-num { background: var(--green-light); color: #fff; font-size: 0; }
.irf-page .irf-steps li.is-complete .irf-step-num::before { content: "\2713"; font-size: 15px; }

/* ---------- Form ---------- */
.irf-page .irf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 22px; }
.irf-page .irf-span { grid-column: 1 / -1; }
.irf-page .irf-field { min-width: 0; }
.irf-page .irf-field select.form-control { padding-right: 38px; }
.irf-page .irf-opt { font-weight: 500; color: #566678; }
.irf-page .irf-hint { margin: 8px 0 0; font-size: 14px; line-height: 1.5; color: #4a5a6b; }

/* Permit summary: shows the application type + address once a permit has loaded */
.irf-page .irf-permit {
    display: flex; align-items: center; gap: 14px; margin: 22px 0 0; padding: 16px 20px;
    background: var(--sand); border: 1px dashed #b9c9c2; border-radius: 14px;
}
.irf-page .irf-permit-icon { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: #e6f1ec; color: var(--green-dark); font-size: 18px; }
.irf-page .irf-permit-type { display: block; font-size: 18px; font-weight: 800; color: var(--green-dark); }
.irf-page .irf-permit-address { display: block; margin-top: 2px; font-size: 15px; color: #3a4a5c; }
.irf-page .irf-permit-type:empty::before { content: "No permit loaded yet"; font-weight: 700; color: #566678; }
.irf-page .irf-permit-address:empty { display: none; }

/* ---------- Notices ---------- */
.irf-page .irf-notice { display: none; }
.irf-page .irf-notice:not(:empty) { display: block; margin: 0 0 18px; padding: 14px 18px; border-radius: 12px; background: #fffaf0; border: 1px solid #ecd9a2; border-left: 5px solid var(--gold); color: #5d4800; font-weight: 600; line-height: 1.55; }
.irf-page .irf-notice--error { display: block; margin: 0 0 24px; background: #fff6f5; border-color: #e4b4b0; border-left-color: #c9524a; color: #6b2222; }

/* ---------- Inspection list ---------- */
.irf-page .irf-inspections { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.irf-page .irf-item {
    display: flex; align-items: flex-start; gap: 16px; padding: 16px 18px;
    background: #fff; border: 1.5px solid #dbe5e0; border-radius: 14px;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.irf-page .irf-item:hover { border-color: var(--green-light); background: #f8fbf9; }
.irf-page .irf-item:has(input:checked) { border-color: var(--green); background: #f1f8f4; box-shadow: 0 0 0 3px var(--ar-ring); }
.irf-page .irf-item:has(input:disabled) { background: var(--sand); border-style: dashed; }
.irf-page .irf-check { flex: none; padding-top: 2px; }
.irf-page .irf-check input[type="checkbox"] { width: 26px; height: 26px; margin: 0; accent-color: var(--green); cursor: pointer; }
.irf-page .irf-check input[type="checkbox"]:disabled { cursor: not-allowed; }
.irf-page .irf-check input[type="checkbox"]:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.irf-page .irf-item-body { flex: 1; min-width: 0; }
.irf-page .irf-item-title { display: block; margin: 0; font-size: 17px; font-weight: 800; line-height: 1.35; color: var(--green-dark); cursor: pointer; }
.irf-page .irf-item-sub { font-weight: 600; color: #3a4a5c; }
.irf-page .irf-item-note { display: block; margin-top: 4px; font-size: 14px; font-style: normal; line-height: 1.5; color: #4a5a6b; }
.irf-page .irf-item-note:empty, .irf-page .irf-item-warn:empty { display: none; }
.irf-page .irf-item-warn { display: block; margin-top: 6px; font-size: 14px; font-weight: 600; line-height: 1.5; color: #a61e1e; }
.irf-page .irf-badge {
    display: inline-block; margin-top: 8px; padding: 4px 12px; border-radius: 999px;
    background: #fffaf0; border: 1px solid #ecd9a2; color: #5d4800; font-size: 13px; font-weight: 700;
}
.irf-page .irf-empty { padding: 28px 20px; text-align: center; border: 1.5px dashed #b9c9c2; border-radius: 14px; background: var(--sand); color: #4a5a6b; font-size: 16px; }
.irf-page .irf-inspections:not(:empty) + .irf-empty { display: none; }
.irf-page .ar-submit-bar { margin-top: 26px; padding-top: 22px; border-top: 1px solid #e3ebe7; display: flex; justify-content: flex-end; gap: 14px; flex-wrap: wrap; }
.irf-page .ar-submit-btn[disabled] { opacity: .7; cursor: progress; }

/* ---------- Review ---------- */
.irf-page .irf-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 22px; margin: 0; border: 1px solid #dbe5e0; border-radius: 14px; background: var(--sand); overflow: hidden; }
.irf-page .irf-summary > div { padding: 16px 20px; border-bottom: 1px solid #dbe5e0; min-width: 0; }
.irf-page .irf-summary > div:last-child { border-bottom: 0; }
.irf-page .irf-summary dt { margin: 0 0 4px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #566678; }
.irf-page .irf-summary dd { margin: 0; font-size: 17px; font-weight: 700; color: var(--green-dark); overflow-wrap: anywhere; }
.irf-page .irf-summary dd span:empty::before { content: "None"; font-weight: 500; color: #566678; }
.irf-page .irf-summary-list ul { margin: 0; padding-left: 20px; font-weight: 600; }
.irf-page .irf-summary-list li { margin-bottom: 4px; }
.irf-page .irf-confirm-bar { justify-content: space-between; }

/* ---------- Done ---------- */
.irf-page .irf-done .card-body { max-width: 680px; margin: 0 auto; padding-top: 40px; padding-bottom: 40px; text-align: center; }
.irf-page .irf-done-icon { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 50%; background: #e6f1ec; color: var(--green-dark); font-size: 30px; }
.irf-page .irf-done h3 { margin: 0 0 10px; font-size: 26px; font-weight: 800; color: var(--green-dark); }
.irf-page .irf-done-lead { margin: 0 auto 26px; max-width: 52ch; font-size: 17px; line-height: 1.6; color: #3a4a5c; }
.irf-page .irf-done-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }

@media (max-width: 767px) {
    .irf-page .irf-steps { grid-template-columns: 1fr; gap: 8px; }
    .irf-page .irf-grid, .irf-page .irf-summary { grid-template-columns: 1fr; }
    .irf-page .irf-item { padding: 14px; gap: 12px; }
    .irf-page .ar-submit-bar { flex-direction: column-reverse; }
    .irf-page .ar-submit-bar .largeButton { width: 100%; }
    .irf-page .irf-done-actions .largeButton { width: 100%; }
}

/* ---------- Loading indicator (permit lookup / review) ---------- */
.irf-page .irf-loading {
    position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 1000;
    display: flex; align-items: center; gap: 12px; max-width: calc(100vw - 32px); padding: 13px 24px;
    border-radius: 999px; background: var(--green-dark); color: #fff; font-size: 16px; font-weight: 700; line-height: 1.3;
    box-shadow: 0 12px 32px rgba(10,30,20,.35);
}
.irf-page .irf-loading[hidden] { display: none; }
.irf-page .irf-spinner {
    flex: none; width: 20px; height: 20px; border-radius: 50%;
    border: 3px solid rgba(255,255,255,.3); border-top-color: #fff; animation: irf-spin .8s linear infinite;
}
@keyframes irf-spin { to { transform: rotate(360deg); } }
/* While waiting: the permit summary and inspection list fade and can't be clicked */
.irf-page.is-loading .irf-permit, .irf-page.is-loading .irf-inspections, .irf-page.is-loading .irf-empty { opacity: .45; pointer-events: none; transition: opacity .15s ease; }
@media (prefers-reduced-motion: reduce) { .irf-page .irf-spinner { animation-duration: 2.4s; } }
