@charset "UTF-8";

/* Page "Einheiten" (pages/UnitsPage.php, pages/UnitDetailPage.php). Uses .fleet, .fleet-grid, .fleet-filter*, .fleet-bar, .fleet-more, .fleet-button,
   .fleet-manage, .fleet-field, .fleet-message from fleet-2.css, .car-card and .car-nav from car-1.css and .doc-* from association-2.css */

/* Overview: introduction text (UnitsPage::renderOverview(), alignment chosen in the form) */
.fleet .units-intro { margin: 0 0 8px; }
.fleet .units-intro.is-justify { text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.fleet .units-intro.is-left { text-align: left; }

/* Overview: cards */
.units-card { box-sizing: border-box; min-width: 0; display: flex; flex-direction: column; background: #fff; border: 2px solid #039; }
.units-signs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 12px 14px 0; text-decoration: none; }
.units-sign { display: block; width: auto; max-width: 100%; height: 96px; }
.units-body { flex: 1 1 auto; min-width: 0; padding: 0 14px 12px; overflow-wrap: break-word; }
/* One size for all headings, always three lines high (min-height = 3 x line-height), so the signs start at the same
   height; only long words (20 characters or more, e.g. "Trinkwasserversorgung") are hyphenated */
.fleet .units-name { margin: 0; padding: 12px 14px 0; border: 0; font-size: 18px; line-height: 1.2; font-weight: bold; color: #039; hyphens: auto; hyphenate-limit-chars: 20 6 6; overflow-wrap: break-word; text-wrap: balance; min-height: 3.6em; }
.units-name a { color: #039; text-decoration: none; }
.units-name a:hover, .units-name a:focus { text-decoration: underline; }
.units-name a:focus-visible { outline: 3px solid #ffe600; outline-offset: 1px; }
.fleet .units-summary { margin: 12px 0 0; font-size: 16px; line-height: 1.4; }
.units-card .fleet-more { margin-top: 0; }
/* Management bar of a card: move up, move down, edit, delete in one row as icons (the text stays for screen readers
   and as title); the move buttons are one POST form each, styled like the links of .fleet-bar */
.units-card .fleet-bar { flex-wrap: nowrap; }
.units-card .fleet-bar > a, .units-move { flex: 1 1 0; min-width: 0; padding: 0; }
.units-card .fleet-bar > a span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.units-move { display: flex; margin: 0; }
.fleet-bar-move { box-sizing: border-box; flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 12px;
  border: 0; background: none; color: #8a4b00; font: inherit; cursor: pointer; }
.fleet-bar-move:hover { background: #ffecc2; }
.fleet-bar-move:focus-visible { outline: 3px solid #ffe600; outline-offset: -3px; }
.fleet-bar-move:disabled { color: #8a4b00; opacity: 0.35; cursor: default; background: none; }


/* Detail page */
.units-description { margin: 0 0 8px; }
.units-structure { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin: 0 0 24px; }
.units-structure-item { min-width: 0; }
.units-figure { margin: 0; min-width: 0; }
.units-figure img { display: block; width: 100%; height: auto; }
.units-figure figcaption { margin-top: 4px; font-size: 14px; color: #53616b; }
/* Box "Abkürzungen" at the end of the section "Gliederung" */
.units-abbr { box-sizing: border-box; padding: 12px 16px; border: 2px solid #039; border-top-width: 5px; }
.fleet .units-abbr h3 { margin: 0 0 8px; padding: 0; border: 0; font-size: 18px; line-height: 1.3; color: #039; }
.units-abbr dl { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px 24px; margin: 0; }
.units-abbr dl > div { display: flex; gap: 8px; min-width: 0; }
.units-abbr dt { flex: 0 0 6.5em; font-weight: bold; }
.units-abbr dd { margin: 0; min-width: 0; }
.units-columns { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.units-list { min-width: 0; margin: 0 0 12px; }
.fleet .units-list h3 { margin: 12px 0 4px; padding: 0; border: 0; font-size: 18px; line-height: 1.3; color: #039; }
.fleet .units-list h4 { margin: 10px 0 4px; padding: 0; border: 0; font-size: 16px; line-height: 1.3; color: #039; }
/* One section per type / sub unit: outline image, tasks, equipment and vehicles together */
.units-type-section { margin: 0 0 24px; }
.units-type-section .units-structure { margin-bottom: 8px; }
.fleet .units-list ul { margin: 0 0 8px; padding-left: 22px; font-size: 16px; line-height: 1.4; }
.fleet .units-list li { margin: 4px 0; overflow-wrap: break-word; }

/* Forms */
.units-block, .units-type { box-sizing: border-box; min-width: 0; margin: 0 0 16px; padding: 12px 14px 8px; border: 2px solid #c5ccd6; }
.units-type { border-color: #039; }
.units-block > legend, .units-type > legend { padding: 0 6px; font-size: 16px; font-weight: bold; color: #039; }
/* The block of the types has no frame of its own: every type has one, a second frame around them would be doubled */
.units-block[data-structure="types"] { padding: 0; border: 0; }
.units-block[data-structure="types"] > legend { margin: 0 0 8px; padding: 0; }
.units-type-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.units-type-tools .fleet-button { min-width: 44px; }
.units-type-tools .fleet-button:disabled { border-color: #c5ccd6; color: #53616b; cursor: default; text-decoration: none; }
.units-pickers { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 16px; }
.units-picker { display: flex; align-items: flex-end; gap: 12px; min-width: 0; }
.units-picker .fleet-field { flex: 1 1 auto; }
.units-preview { flex: none; display: flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; margin-bottom: 12px; }
.units-preview img { display: block; max-width: 120px; height: 64px; width: auto; object-fit: contain; }
.fleet .units-field-error { color: #b00000; font-weight: bold; }
.fleet-field select[aria-invalid="true"], .fleet-field input[aria-invalid="true"], .fleet-field textarea[aria-invalid="true"] { border-color: #b00000; }
.fleet-field > .fleet-hint { margin-top: 4px; margin-bottom: 0; }
.fleet-field > span small { font-size: 13px; }

/* Lists of the form (tasks, equipment, vehicles). Without JavaScript one field per entry; with it (.has-script) like
   the abbreviations: rows with text and buttons, the field of a row only while editing (.is-editing), a field to add */
.units-list-items { margin: 0 0 8px; padding: 0; list-style: none; }
.units-list-item { margin: 0 0 6px; }
.units-list-item input[type="text"], .units-list-new input[type="text"] { box-sizing: border-box; display: block; width: 100%; min-height: 44px; padding: 8px 10px;
  border: 2px solid #53616b; font: inherit; font-size: 16px; color: #202020; background: #fff; }
.units-list-item input[aria-invalid="true"] { border-color: #b00000; }
.units-list-text, .units-list-tools, .units-list-new { display: none; }
.has-script .units-list-items { border-top: 1px solid #c5ccd6; }
.has-script .units-list-items:empty { border-top: 0; }
.units-list.has-script .units-list-item { display: flex; align-items: center; gap: 8px; min-height: 44px; margin: 0; padding: 2px 0; border-bottom: 1px solid #c5ccd6; }
.has-script .units-list-item:not(.is-editing) input[type="text"] { display: none; }
.has-script .units-list-item.is-editing { background: #fff6e0; }
.has-script .units-list-item.is-editing input[type="text"] { flex: 1 1 auto; min-width: 0; }
.has-script .units-list-item:not(.is-editing) .units-list-text { display: block; flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.has-script .units-list-item.is-headline .units-list-text { font-weight: bold; color: #039; }
.has-script .units-list-tools { display: flex; flex: 0 0 auto; gap: 4px; }
.units-list-tools .fleet-button { box-sizing: border-box; width: 44px; height: 44px; padding: 0; justify-content: center; }
.fleet-button.units-remove { border-color: #b00000; color: #b00000; }
.fleet-button.units-remove:hover { background: #fdeaea; }
.units-list-tools .fleet-button:disabled { border-color: #c4cad0; color: #8b959e; background: #fff; cursor: default; }
.has-script .units-list-new { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0 12px; }
.units-list-new .fleet-field { flex: 1 1 260px; min-width: 0; margin: 0 0 8px; }
.units-list-new .units-list-add { margin: 0 0 8px; }
.units-list-item input[type="text"]:focus-visible, .units-list-new input[type="text"]:focus-visible { outline: 3px solid #ffe600; outline-offset: 1px; }

/* Unit form: abbreviations of the unit (list of the chosen ones, combobox to add stored or new ones) */
.units-abbr-pick { margin: 0 0 12px; }
.units-abbr-pick .units-abbr-none { margin: 0 0 8px; }
.units-abbr-chosen { margin: 0 0 12px; padding: 0; list-style: none; border-top: 1px solid #c5ccd6; }
.units-abbr-chosen:empty { display: none; }
.units-abbr-item { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 2px 0; border-bottom: 1px solid #c5ccd6; }
.units-abbr-text { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.units-abbr-text b { display: inline-block; min-width: 6.5em; margin-right: 8px; }
.units-abbr-badge { flex: 0 0 auto; padding: 1px 6px; border: 1px solid #8a4b00; border-radius: 4px; background: #fff6e0; color: #8a4b00; font-size: 13px; }
.units-abbr-add { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0 12px; }
.units-abbr-add .fleet-field { margin: 0; }
.units-abbr-add > .units-combo, .units-abbr-add > .units-abbr-new { flex: 1 1 260px; min-width: 0; margin: 0 0 12px; }
.units-abbr-add > .units-abbr-submit { margin: 0 0 12px; }
.units-combo { position: relative; }
.units-combo input[type="text"] { box-sizing: border-box; display: block; width: 100%; min-height: 44px; padding: 8px 10px;
  border: 2px solid #53616b; background: #fff; color: #202020; font: inherit; font-size: 16px; }
.units-combo input[type="text"]:focus-visible { outline: 3px solid #ffe600; outline-offset: 1px; }
.units-combo input[aria-invalid="true"] { border-color: #b00000; }
.units-combo-list { position: absolute; z-index: 20; top: 100%; left: 0; right: 0; max-height: 320px; overflow-y: auto; margin: 2px 0 0; padding: 0;
  list-style: none; border: 2px solid #039; background: #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }
.units-combo-option { box-sizing: border-box; min-height: 44px; padding: 10px 12px; cursor: pointer; }
.units-combo-option b { display: inline-block; min-width: 6.5em; margin-right: 8px; }
.units-combo-option[aria-selected="true"], .units-combo-option:hover { background: #eaf0fa; }
.units-combo-option.is-create { border-top: 1px solid #c5ccd6; font-weight: bold; color: #039; }
.units-combo-option.is-create:first-child { border-top: 0; }
.units-combo-empty { padding: 10px 12px; color: #53616b; }
.units-abbr-new .units-field-error { margin: 4px 0 0; }
/* With JavaScript the field "Bedeutung" and the button only appear for a new abbreviation */
.units-abbr-pick.is-enhanced .units-abbr-add:not(.is-creating) > .units-abbr-new,
.units-abbr-pick.is-enhanced .units-abbr-add:not(.is-creating) > .units-abbr-submit { display: none; }

/* Abbreviation list: table with lines, one row per abbreviation; "Bearbeiten" shows the fields of the row (tr.is-editing) */
.units-abbr-scroll { max-width: 100%; overflow-x: auto; margin: 0 0 12px; }
.units-abbr-table { width: 100%; min-width: 560px; border-collapse: collapse; border-top: 2px solid #039; }
.units-abbr-table th { padding: 8px; white-space: nowrap; border-bottom: 2px solid #039; text-align: left; font-size: 14px; color: #53616b; }
.units-abbr-table td { padding: 6px 8px; border-bottom: 1px solid #c5ccd6; vertical-align: middle; overflow-wrap: anywhere; }
.units-abbr-table tbody tr:hover td { background: #f5f7fa; }
.units-abbr-table td.units-abbr-short { width: 7em; font-weight: bold; }
.units-abbr-table td.units-abbr-meaning { min-width: 12em; }
.units-abbr-table td, .units-abbr-table th { hyphens: manual; }
.units-abbr-actions .units-abbr-icon { width: 44px; padding: 0; }
.units-abbr-cell { display: flex; align-items: center; gap: 12px; }
.units-abbr-cell > .units-abbr-view, .units-abbr-cell > .units-abbr-edit { flex: 1 1 auto; min-width: 0; }
.units-abbr-table .units-abbr-uses { flex: 0 0 auto; padding: 2px 8px; border: 1px solid #c5ccd6; border-radius: 4px; background: #f5f7fa;
  font-size: 13px; line-height: 1.25; text-align: center; white-space: nowrap; color: #53616b; }
.units-abbr-table .units-abbr-actions { width: 1%; white-space: nowrap; }
.units-abbr-actions .units-abbr-view, .units-abbr-actions form { display: flex; justify-content: flex-end; gap: 6px; margin: 0; }
.units-abbr-table tr:not(.is-editing) .units-abbr-edit, .units-abbr-table tr.is-editing .units-abbr-view { display: none; }
.units-abbr-table tr.is-editing td { background: #fff6e0; }
.units-abbr-table input[type="text"] { box-sizing: border-box; display: block; width: 100%; min-height: 44px; padding: 8px 10px;
  border: 2px solid #53616b; background: #fff; color: #202020; font: inherit; font-size: 16px; font-weight: normal; }
.units-abbr-table input[type="text"]:focus-visible { outline: 3px solid #ffe600; outline-offset: 1px; }
.units-abbr-table input[aria-invalid="true"] { border-color: #b00000; }

/* Switch "Aufbau der Einheit": two radio buttons as a slider, the blue thumb slides to the chosen one */
.units-switch { margin: 0 0 16px; padding: 0; border: 0; min-width: 0; }
.units-switch legend { margin: 0 0 6px; padding: 0; font-weight: bold; color: #202020; }
.units-switch-track { position: relative; display: grid; grid-template-columns: 1fr 1fr; max-width: 560px; border: 2px solid #039; border-radius: 24px;
  background: #fff; overflow: hidden; }
.units-switch-track input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.units-switch-track label { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 6px 12px;
  box-sizing: border-box; border-radius: 22px; text-align: center; font-weight: bold; color: #039; cursor: pointer; transition: color 0.2s; }
.units-switch-track input:checked + label { color: #fff; }
.units-switch-track input:not(:checked) + label:hover { background: #eaf0fa; }
.units-switch-track input:focus-visible + label { outline: 3px solid #ffe600; outline-offset: -3px; }
.units-switch-thumb { position: absolute; top: 0; bottom: 0; left: 0; width: 50%; border-radius: 22px; background: #039; transition: transform 0.2s ease; }
#units-structure-types:checked ~ .units-switch-thumb { transform: translateX(100%); }
@media (prefers-reduced-motion: reduce) { .units-switch-thumb, .units-switch-track label { transition: none; } }
