/* Probate Smart Forms — each form category's table (Form / PDF / Word / Web columns in the
   source, where at most one of those three cells was ever actually filled in per row) is
   restructured as a simple name + single color-coded "Open" button per row, matching the
   single-link-per-item convention used elsewhere on this site. Colors match the source's own
   .btn-default:has(...) CSS rules (Word/PDF/Web-form each got a distinct color there too). */
.form-row-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid #e3e8ee;
}
.form-row:last-child { border-bottom: 0; }
.form-row-name { flex: 1 1 260px; }
.form-row .btn { flex-shrink: 0; white-space: nowrap; }
.form-row .btn .bi { margin-right: 0.3rem; }

.form-link-pdf { color: #8f1f1b; border-color: #8f1f1b; }
.form-link-pdf:hover, .form-link-pdf:focus-visible { background: #8f1f1b; color: #fff; }
.form-link-word { color: #03395f; border-color: #03395f; }
.form-link-word:hover, .form-link-word:focus-visible { background: #03395f; color: #fff; }
.form-link-web { color: #0f6f52; border-color: #0f6f52; }
.form-link-web:hover, .form-link-web:focus-visible { background: #0f6f52; color: #fff; }

/* Individual "smart form" detail pages (Z5-G, A1-G, etc.) — fillable web forms that replace the
   source DNN pages' Kendo UI PDF export (kendo.drawing.drawDOM/pdf.saveAs) with a plain
   browser print / "Save as PDF" button, since Kendo isn't part of this project. #psmMain is the
   source's own wrapper id, kept as-is since every one of these ~20 forms reuses it. */
#psmMain .card-header {
    text-align: center;
    text-transform: uppercase;
    font-weight: bold;
}
#psmMain .form-number-badge {
    font-size: 2rem;
    border-left: 1px dashed #424242;
    text-align: center;
}
#psmMain .text-large { font-size: 1.05rem; }
#psmMain .text-blond { font-weight: 700; }
#psmMain .form-control {
    background-color: #f8fcff;
    border: none;
    border-bottom: 1px solid #2c2b35;
    border-radius: 0;
}
#psmMain table .form-control { border-bottom: none; }
#psmMain .form-check-label { margin-left: 0.4rem; }

/* Standalone inline checkboxes (no .form-check wrapper — these sit mid-sentence/mid-row, not
   stacked) rendered too faint at Bootstrap 5's default 1px border. Bumped size/border and nudged
   down half a line so the box sits on the same baseline as its label text instead of floating
   high. */
#psmMain .form-check-input {
    width: 1.1em;
    height: 1.1em;
    margin-top: 0;
    vertical-align: -0.2em;
    border: 1.5px solid #333;
}
#psmMain .form-check-input:checked {
    background-color: #333;
    border-color: #333;
}

/* Short fill-in-the-blank inputs used mid-sentence (case fields, dates, amounts). Auto-width
   instead of a fixed percentage so on-screen typing isn't visually cramped; the beforeprint swap
   below is what actually prevents clipping when printed. */
#psmMain .fill-blank {
    display: inline-block;
    width: auto;
    min-width: 90px;
}

/* Field-group pattern for stacked "input over its own label" fields (Signature, Date, Printed
   Name, notary block, etc.) — tight gap between an input and the label describing it, generous
   gap before the next field group, so it's visually unambiguous which label belongs to which box
   (this was the "which box is which" complaint from review). */
#psmMain .field-group { margin-bottom: 1.75rem; }
#psmMain .field-group label {
    display: block;
    margin-top: 0.35rem;
    margin-bottom: 0;
    font-weight: 500;
    font-size: 0.85rem;
    color: #444;
}

/* Letter paper with a tighter-than-browser-default margin — the default ~1in margin on all four
   sides left a lot of unused white border once the site chrome is hidden for print. */
@page {
    size: letter;
    margin: 0.5in;
}

@media print {
    .site-header, .page-title-band, .site-footer, .skip-link, .no-print { display: none !important; }
    .content-panel { box-shadow: none !important; border: none !important; padding: 0 !important; }
    #psmMain .form-control, #psmMain select.form-control {
        border: none !important;
        background: transparent !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    #psmMain .form-check-input {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        border: 1.5px solid #000 !important;
    }
    /* Inputs/selects are swapped for these unbounded-width spans right before printing (see the
       beforeprint/afterprint handlers on each smart-form page) so a long typed value is never
       clipped by a fixed input width the way it was in the first review pass. */
    .print-fill {
        display: inline-block;
        border-bottom: 1px solid #000;
        padding: 0 2px;
        white-space: pre-wrap;
        overflow-wrap: break-word;
    }
    /* Keep a label glued to the value/box directly above it (e.g. Date's filled-in value and its
       "Date" caption) — without this a page break can land between the two, splitting a field
       group's box from its own caption across pages. Applied to the same building blocks used
       throughout every smart-form page: field-group pairs, cards, and standalone paragraphs. */
    #psmMain .field-group,
    #psmMain .card,
    #psmMain p {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}
