@charset "UTF-8";

/* Page "Rubrikbilder" of the administration (HeaderImageAdminPage, ticket 49). Uses .fleet*, .login-*, .units-switch*.
   Management colours (#8a4b00 on #fff6e0, delete #b00000) as the other management views. */

/* slider between the two views: links instead of radio buttons */
.hdr-switch { margin: 0 0 16px; }
.hdr-switch-track a { 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; text-decoration: none; transition: color 0.2s; }
.hdr-switch-track a.is-active { color: #fff; }
.hdr-switch-track a:not(.is-active):hover { background: #f4f5f6; }
.hdr-switch-track a:focus-visible { outline: 3px solid #003399; outline-offset: -3px; }
.hdr-switch-track a.is-active:focus-visible { outline-color: #fff; }
.hdr-switch-track.is-second .units-switch-thumb { transform: translateX(100%); }

.hdr-heading { margin: 24px 0 12px; font-size: 20px; line-height: 1.3; color: #000; }


/* list of pairs */
.hdr-list { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.hdr-card { border: 2px solid #dadee1; background: #fff; }
.hdr-card-main { display: grid; gap: 12px; padding: 12px 16px; }
/* desktop 4:1 and mobile 2:1 side by side over the whole width: 2fr / 1fr gives both the same height */
.hdr-previews { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
.hdr-figure { min-width: 0; margin: 0; }
.hdr-previews .hdr-preview-image { width: 100%; }
.hdr-figure figcaption { margin-top: 4px; font-size: 14px; color: #53616b; }
.hdr-preview-image { display: block; max-width: 100%; height: auto; background: #edeff0; }
.hdr-card-text { min-width: 0; }
.hdr-card-text p { margin: 0 0 6px; overflow-wrap: anywhere; }
.hdr-bar { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; padding: 10px 16px; border-top: 2px dashed #8a4b00; background: #fff6e0; }

/* page assignment: one box per page like the timeline of the Behördenleitung (.history-ob-box of history-3.css: white,
   2 px border #039, the start page with 5 px on top like the current entry), on the lines of the page tree: blue 2 px
   lines and round dots of 16 px like the timeline of the chronicle; lines of HeaderImageAdminPage::treeLines().
   A box of depth d starts at x = 30 + 32 d px; the line of its sub pages runs 10 px inside it (column d + 1 at
   x = 8 + 32 (d + 1) px), so it starts at the bottom of the box. The dot of a page sits on that line (the start page: in
   column 0 in front of its box), a short line leads from the dot to the box. Dots and lines meet at the middle of the
   box (50 % of the item + half of its 12 px gap on top).
   No overflow anywhere: the open combobox lies over the boxes below it and must not be clipped. */
.hdr-pages { container-type: inline-size; margin: 0 0 16px; padding: 0; list-style: none; }
.hdr-node { position: relative; padding-top: 12px; }
.hdr-node:first-child { padding-top: 0; }
.hdr-node-box { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; box-sizing: border-box; min-width: 0;
  margin-left: 30px; padding: 10px 16px; background: #fff; border: 2px solid #039; }
.hdr-node-box::before { content: ""; position: absolute; top: calc(50% - 1px); left: -24px; width: 22px; height: 2px; background: #039; }
.hdr-depth-1 > .hdr-node-box { margin-left: 62px; }
.hdr-depth-2 > .hdr-node-box { margin-left: 94px; }
.hdr-depth-3 > .hdr-node-box { margin-left: 126px; }
.hdr-depth-4 > .hdr-node-box { margin-left: 158px; }
.hdr-root > .hdr-node-box { border-top-width: 5px; padding-top: 7px; }
/* start page and entries of the main menu: grey box (THW silver 30 %) */
.hdr-root > .hdr-node-box, .hdr-main > .hdr-node-box { background: #f4f5f6; }
.hdr-node-name { flex: 1 1 160px; min-width: 0; font-weight: bold; overflow-wrap: anywhere; }
.hdr-root .hdr-node-name { font-size: 18px; color: #003399; }
.hdr-node-inherit { flex: 0 0 110px; }
/* narrow: the picture shrinks with the box, an empty slot of "vererben" takes no line */
@container (width < 560px) {
  .hdr-node-box { padding-right: 12px; padding-left: 12px; }
  .hdr-node-box > .hdr-picker, .hdr-node-box > .hdr-picture { display: block; flex: 1 1 100%; min-width: 0; }
  .hdr-picker summary { min-width: 0; }
  .hdr-picker-current { flex: 1 1 auto; min-width: 0; }
  .hdr-picker-arrow { flex: none; }
  .hdr-picker-current img, .hdr-picture img { width: 100%; min-width: 0; max-width: 180px; height: auto; aspect-ratio: 2 / 1; }
  .hdr-node-inherit:empty { display: none; }
}
/* lines from the box above down: "pass" and "tee" through the whole item, "end" (last child) only down to its dot */
.hdr-tree-line { position: absolute; top: 0; bottom: 0; width: 2px; background: #039; }
.hdr-tree-line.is-end { bottom: calc(50% - 6px); }
/* z-index: above the short line from the dot to the box (.hdr-node-box::before comes later); the open combobox (z-index 10) stays above */
.hdr-tree-dot { position: absolute; z-index: 1; top: calc(50% - 2px); box-sizing: border-box; width: 16px; height: 16px; margin-left: -7px; border-radius: 50%; background: #039; }
.hdr-node:first-child .hdr-tree-dot { top: calc(50% - 8px); }
/* start page: yellow dot with blue border like the current entry of the timeline (.history-ob.is-current) */
.hdr-root .hdr-tree-dot { background: #ffeb00; border: 3px solid #039; }
.hdr-tree-col-0 { left: 8px; }
.hdr-tree-col-1 { left: 40px; }
.hdr-tree-col-2 { left: 72px; }
.hdr-tree-col-3 { left: 104px; }
.hdr-tree-col-4 { left: 136px; }
.hdr-inherit { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.hdr-inherit input { width: 22px; height: 22px; }
.hdr-picker { position: relative; display: inline-block; }
.hdr-picture img { display: block; width: 180px; height: 90px; background: #edeff0; }
.hdr-picker summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 8px; list-style: none; border: 2px solid #003399; background: #fff; cursor: pointer; color: #003399; font-weight: bold; }
.hdr-picker summary::-webkit-details-marker { display: none; }
.hdr-picker summary:focus-visible { outline: 3px solid #003399; outline-offset: 2px; }
/* arrow of the combobox */
.hdr-picker-arrow { width: 8px; height: 8px; margin: 0 4px 4px; border: solid #003399; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.hdr-picker[open] .hdr-picker-arrow { margin-top: 6px; margin-bottom: 0; transform: rotate(-135deg); }
/* not an own pair: inherited pair or default picture */
.hdr-pages img.is-fallback { outline: 2px dashed #53616b; outline-offset: -2px; }
.hdr-picker-current, .hdr-option { display: flex; align-items: center; gap: 8px; }
.hdr-picker img, .hdr-option img { display: block; width: 180px; height: 90px; background: #edeff0; }
/* the list of the open combobox lies over the table, so the table keeps its size */
.hdr-picker-options { position: absolute; top: 100%; left: 0; z-index: 10; min-width: 100%; box-sizing: border-box; display: grid; gap: 4px; margin-top: 4px; padding: 6px; border: 2px solid #dadee1; background: #fff; max-height: 360px; overflow-y: auto; }
.hdr-option { min-height: 44px; padding: 2px 6px; cursor: pointer; }
.hdr-option:hover { background: #f4f5f6; }
.hdr-option[hidden] { display: none; }
.hdr-option input { width: 22px; height: 22px; flex: none; }
.hdr-option:has(input:focus-visible) { outline: 3px solid #003399; outline-offset: 2px; }
.hdr-option:has(input:checked) { background: #edeff0; }

/* upload form */
.hdr-fields { display: grid; grid-template-columns: 1fr; gap: 24px; margin: 16px 0; }
.hdr-field { min-width: 0; margin: 0; padding: 12px 16px 16px; border: 2px solid #dadee1; }
.hdr-field.is-invalid { border-color: #b00000; }
.hdr-field legend { padding: 0 6px; font-weight: bold; }
.hdr-preview { display: flex; align-items: center; justify-content: center; width: 100%; overflow: hidden; background: #edeff0; border: 1px solid #dadee1; }
/* the grey area only once a picture was chosen (the script fills it) */
.hdr-preview:empty { display: none; }
.hdr-preview.is-desktop { aspect-ratio: 4 / 1; }
.hdr-preview.is-mobile { aspect-ratio: 2 / 1; }
.hdr-preview img { display: block; max-width: 100%; max-height: 100%; }
.hdr-file { max-width: 100%; }
.hdr-drop { margin: 12px 0 8px; }
.hdr-drop.is-enhanced .fleet-dropzone > .fleet-dropzone-text { min-height: 150px; padding: 16px 12px; }
.hdr-drop .fleet-dropzone-title { overflow-wrap: anywhere; }
.hdr-result { margin: 0; min-height: 24px; font-weight: bold; }
.hdr-result.is-ok { color: #1e6b2e; }
.hdr-result.is-error { color: #b00000; }
/* Upload progress (only with JavaScript, the block is hidden otherwise) */
.hdr-progress { margin: 16px 0 0; }
.hdr-progress[hidden] { display: none; }
.hdr-progress progress { display: block; box-sizing: border-box; width: 100%; height: 16px; border: 2px solid #003399; background: #fff; color: #003399; appearance: none; }
.hdr-progress progress::-webkit-progress-bar { background: #fff; }
.hdr-progress progress::-webkit-progress-value { background: #003399; }
.hdr-progress progress::-moz-progress-bar { background: #003399; }
/* Processing on the server (no value): stripes, moving unless reduced motion is wanted */
.hdr-progress progress:indeterminate { background: repeating-linear-gradient(-45deg, #003399 0 8px, #fff 8px 16px); background-size: 200% 100%; animation: hdr-progress-stripes 1.5s linear infinite; }
.hdr-progress progress:indeterminate::-webkit-progress-bar { background: transparent; }
.hdr-progress progress:indeterminate::-moz-progress-bar { background: transparent; }
@keyframes hdr-progress-stripes { to { background-position: -45px 0; } }
@media (prefers-reduced-motion: reduce) { .hdr-progress progress:indeterminate { animation: none; } }
.hdr-progress-text { margin: 8px 0 0; font-size: 16px; color: #000; }
.hdr-progress.is-error progress { display: none; }
.hdr-progress.is-error .hdr-progress-text { margin: 0; font-weight: bold; color: #b00000; }
.hdr-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0 0; }
.hdr-actions.is-end { justify-content: flex-end; }
/* delete dialog: box like .fleet-dialog-car of "Fahrzeug löschen" (that one sizes its img, so not reused) */
.hdr-dialog-pair { margin: 0 0 16px; padding: 12px; border: 2px solid #039; }
.hdr-dialog-pair p, .hdr-dialog-pair ul { margin: 12px 0 0; }

@media (prefers-reduced-motion: reduce) { .hdr-switch-track a { transition: none; } }
