* {
    box-sizing: border-box;
}

body {
    font-family: Segoe UI, Arial, sans-serif;
    color: #1a1a1a;
    background: #ffffff;
    margin: 0;
    padding: 24px;
}

.printToolbar {
    margin-bottom: 16px;
}

/* Deliberately not excluded from @media print below (unlike .printToolbar) --
   this needs to survive onto actual paper, since a printed report handed to
   someone is exactly the context where "is this real?" matters most. */
.exercisePrintBanner {
    background: repeating-linear-gradient(
        45deg,
        #f0a83c,
        #f0a83c 16px,
        #1a1305 16px,
        #1a1305 32px
    );
    text-align: center;
    padding: 8px 12px;
    margin-bottom: 16px;
    border: 2px solid #1a1305;
}

/* Text sits on its own solid chip rather than directly on the stripes --
   dark text is only readable on the amber half of a diagonal stripe
   pattern, invisible against the black half, and vice versa for light
   text. A solid backdrop is legible against either. */
.exercisePrintBanner span {
    display: inline-block;
    background: #1a1305;
    color: #f0a83c;
    border-radius: 3px;
    padding: 3px 14px;
    font-weight: 800;
    font-size: 0.95em;
    letter-spacing: 0.05em;
}

.printToolbar button {
    background-color: #eee;
    color: #1a1a1a;
    border: 1px solid #999;
    border-radius: 4px;
    padding: 6px 14px;
    margin-right: 8px;
    cursor: pointer;
}

.printHeader h1 {
    margin: 0 0 4px 0;
    font-size: 1.4em;
}

.printHeader p {
    margin: 2px 0;
    color: #444;
}

.printMeta {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 16px !important;
}

.printEmpty {
    color: #666;
    font-style: italic;
}

.printTable {
    width: 100%;
    border-collapse: collapse;
}

.printTable th,
.printTable td {
    border: 1px solid #999;
    padding: 6px 8px;
    text-align: left;
    font-size: 0.9em;
}

.printTable th {
    background-color: #eee;
}

.printTable--fixed {
    table-layout: fixed;
}

.printTable--fixed th,
.printTable--fixed td {
    padding: 6px 5px;
}

.printTable--fixed td {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* EOC status is a variable-length, comma-separated summary — let it wrap
   across lines instead of clipping like the rest of the fixed-width columns. */
.printTable--fixed td.eocStatusCell {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
}

/* IAP packet -- each section (Objectives/Org Chart/Comms Plan/Resource
   Status/Activity Summary) gets its own heading + spacing, same table
   look as every other print report's own .printTable. */
.iapSection {
    margin-bottom: 20px;
}

.iapSection h2 {
    font-size: 1.05em;
    border-bottom: 1px solid #999;
    padding-bottom: 4px;
    margin-bottom: 8px;
}

/* Free text -- preserve whatever line breaks Net Control actually typed,
   rather than collapsing multi-line objectives onto one run-on line. */
.iapObjectives {
    white-space: pre-wrap;
}

#map {
    width: 100%;
    height: 80vh;
    border: 1px solid #999;
}

/* A single Missing Persons record "to hand out" (the match-detail popup's
   own Print action) -- a flyer-style card, not a spreadsheet row, so it
   reads well as a standalone printed page. */
.printMissingCard h2 {
    margin-bottom: 4px;
}

.printMissingStatus {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 16px;
}

.printFieldTable {
    border-collapse: collapse;
}

.printFieldTable th,
.printFieldTable td {
    text-align: left;
    padding: 6px 12px 6px 0;
    vertical-align: top;
    font-size: 0.95em;
}

.printFieldTable th {
    white-space: nowrap;
    color: #444;
}

.markerLabel {
    white-space: pre-line !important;
    text-align: center;
    line-height: 1.15;
}

/* ICS-207 Incident Organization Chart -- same box-and-line shape as
   Command Overview's own on-screen chart (commandoverview.js's
   buildCommandStaffOrgChart), tuned for print: higher-contrast borders
   than the screen version's teal, and each box kept off a page break. */
.commandStaffOrgChart {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.commandStaffOrgBox {
    border: 1px solid #1a1a1a;
    border-radius: 4px;
    padding: 8px 12px;
    min-width: 150px;
    page-break-inside: avoid;
}

.commandStaffOrgBoxLabel {
    font-weight: 700;
    font-size: 0.95em;
    margin-bottom: 3px;
}

.commandStaffOrgBoxPerson {
    font-size: 0.9em;
}

.commandStaffOrgChildren {
    display: flex;
    gap: 14px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #999;
}

/* Not persisted (Print.cshtml's own comment) -- plain text input styled
   like every other print-toolbar control. */
#preparedByInput {
    border: 1px solid #999;
    border-radius: 4px;
    padding: 5px 8px;
    margin-left: 4px;
}

@media print {
    .printToolbar {
        display: none;
    }

    body {
        padding: 0;
    }

    #map {
        height: 90vh;
        border: none;
    }
}
