/* Staff site, 9 of 13: maps, the crew location notice and the crew map. */

/* Maps (js/map) */
.map-canvas { height: 340px; margin: .5rem 0 .75rem; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
/* MapLibre's control buttons stay white in both themes, so the toggle keeps light-theme colours
   rather than the theme tokens (which turn it white-on-white in dark mode). */
.map-layer-toggle { width: auto !important; padding: 0 .6rem !important; font-weight: 600; font-size: .8rem; line-height: 29px; font-family: inherit; color: #14212B; }
.map-layer-toggle[aria-pressed="true"] { background: #E9F0F5; }
@media (max-width: 600px) { .map-canvas { height: 280px; } }

/* ---- crew location notice ---- */
.notice-text h2 { margin-top: 0; }
.notice-text h3 { font-size: 1rem; margin: 1.25rem 0 .25rem; }
.notice-sign p { margin: 1.25rem 0; }

@media print {
    @page { margin: 12mm; }
    .sidebar, .appbar, .tabbar, .standalone-back, .no-print, #blazor-error-ui { display: none !important; }
    .shell { display: block; }
    .content { padding: 0; max-width: none; }
    .notice-sheet { border: 0; box-shadow: none; padding: 0; background: #fff; }
    body { background: #fff; color: #000; }

    /* Client pages print as the card alone, edge to edge. */
    .public-shell { padding: 0; min-height: 0; }
    .public-card { max-width: none; border: 0; box-shadow: none; padding: 0; background: #fff; }

    /* The client's job report on paper (the office page prints as it is): Photos start their own page,
       two to a row, short enough that six and a few notes share it on Letter or A4. */
    .public-card .job-report-photos-section { break-before: page; border-top: 0; }
    .public-card .job-report-section h3 { break-after: avoid; }
    .public-card .job-report-visits li, .public-card .job-report-notes li { break-inside: avoid; }
    .public-card .job-report-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4mm; }
    .public-card .job-report-photos li { break-inside: avoid; background: #fff; box-shadow: none; }
    .public-card .job-report-photos img { max-height: 42mm; }
    .public-card .job-report-photos figcaption { flex-direction: row; flex-wrap: wrap; column-gap: .5em; }
}

/* ---- crew map ---- */
.crew-map { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: 1rem; align-items: start; }
.crew-map-canvas { height: calc(100vh - 12rem); height: calc(100svh - 12rem); min-height: 24rem; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--well); }
.crew-map-list { display: grid; gap: 1rem; max-height: calc(100vh - 12rem); max-height: calc(100svh - 12rem); overflow-y: auto; }
.crew-map-list h2 { font-size: 1rem; margin: 0 0 .5rem; }
.crew-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.crew-row { display: grid; gap: .2rem; width: 100%; text-align: left; font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .6rem .75rem; }
button.crew-row:not(:disabled) { cursor: pointer; }
button.crew-row:not(:disabled):hover { border-color: var(--brand-blue-light); }
.crew-row.is-selected { border-color: var(--brand-blue); box-shadow: 0 0 0 2px var(--info-wash); }
.crew-row.is-closed { opacity: .75; }
.crew-row .row-top { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.crew-map-stamp { font-size: var(--fs-smaller); }
.crew-map-notice { margin-top: 1rem; }
.crew-map-notice summary { cursor: pointer; font-weight: 600; }

/* Phone: the list is the page, the map sits under it. */
@media (max-width: 800px) {
    .crew-map { grid-template-columns: 1fr; }
    .crew-map-list { order: -1; max-height: none; overflow: visible; }
    .crew-map-canvas { height: 55vh; height: 55svh; min-height: 18rem; }
}
