/* Arabic script appears smaller at equal font-size due to character complexity */
html[lang="ar"] {
    font-size: 110%;
}

/* Mirror directional arrow/chevron icons in RTL */
html[dir="rtl"] .bi-arrow-left::before { content: "\f138"; } /* arrow-right */
html[dir="rtl"] .bi-arrow-right::before { content: "\f12f"; } /* arrow-left */
html[dir="rtl"] .bi-arrow-left-circle::before { content: "\f134"; } /* arrow-right-circle */
html[dir="rtl"] .bi-arrow-right-circle::before { content: "\f12a"; } /* arrow-left-circle */
html[dir="rtl"] .bi-arrow-left-circle-fill::before { content: "\f133"; } /* arrow-right-circle-fill */
html[dir="rtl"] .bi-arrow-right-circle-fill::before { content: "\f129"; } /* arrow-left-circle-fill */
html[dir="rtl"] .bi-chevron-left::before { content: "\f285"; } /* chevron-right */
html[dir="rtl"] .bi-chevron-right::before { content: "\f284"; } /* chevron-left */
html[dir="rtl"] .fa-arrow-left::before { content: "\f061"; } /* arrow-right */
html[dir="rtl"] .fa-arrow-right::before { content: "\f060"; } /* arrow-left */

.brand-color {
    color: #9fc721;
}

.places-rows .drag-handle {
    text-align: center;
    cursor: grab;
    border: solid 1px #ced4da;
    border-radius: 0.375rem;
    background-color: white;
    line-height: 2.3em;
}

.travel-time-column {
    text-align: center;
}

.places-sortable {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

.action-buttons {
    text-align: end;
}

.empty-list-container {
    text-align: center;
}

.empty-list-container img {
    margin-bottom: 26px;
    margin-top: 100px;
}

.row.row-no-padding > * {
    padding-inline: 0;
}

.mobile-table-header {
    display: none;
}

.places-rows .loop-counter {
    display: none;
}

/* Phone */
@media only screen and (max-width: 760px) {
    .desktop-table-header,
    .places-rows .drag-handle {
        display: none;
    }

    .mobile-table-header,
    .places-rows .loop-counter {
        display: block;
    }

    .action-buttons,
    .main-form .btn {
        /*TODO: don't apply to templates from GAEB report*/
        /*margin-top: 5px;*/
    }
    .places-rows {
        margin-top: 20px;
    }

    .travel-time-column {
        text-align: start;
    }
}

.flash {
    -moz-animation: flash 1s ease-out;
    -moz-animation-iteration-count: 3;

    -webkit-animation: flash 1s ease-out;
    -webkit-animation-iteration-count: 3;

    -ms-animation: flash 1s ease-out;
    -ms-animation-iteration-count: 3;
}

@keyframes flash {
    0% {
        background-color: transparent;
    }
    50% {
        background-color: red;
    }
    100% {
        background-color: transparent;
    }
}

@-webkit-keyframes flash {
    0% {
        background-color: transparent;
    }
    50% {
        background-color: red;
    }
    100% {
        background-color: transparent;
    }
}

@-moz-keyframes flash {
    0% {
        background-color: transparent;
    }
    50% {
        background-color: red;
    }
    100% {
        background-color: transparent;
    }
}

@-ms-keyframes flash {
    0% {
        background-color: transparent;
    }
    50% {
        background-color: red;
    }
    100% {
        background-color: transparent;
    }
}

 .service-selection .categories {
     font-weight: bold;
     margin: 0;
     padding-top: 10px;
 }
.service-selection .areas {
    padding-top: 5px;
    font-weight: bold;
    margin: 0;
    margin-inline-start: 10px;
}
.service-selection .services {
    margin: 0;
    margin-inline-start: 20px;
}

.admin-icon {
    text-shadow: 0 0 8px #ffd700, 0 0 16px #ffd700, 0 0 24px #ffd700;
}

/* Zeile als Trefferfläche für Bootstraps .stretched-link. Ohne die Transformation macht WebKit aus
   dem <tr> keinen umschließenden Block, und die letzte Zeile schluckt jeden Klick der ganzen Karte. */
.stretched-link-row {
    position: relative;
    transform: translate(0);
}

/* --- Kennzeichen (#328) -----------------------------------------------------
   Ein Kennzeichen ist im Fuhrpark die Kennung, die jeder benutzt — im Gespräch,
   auf dem Schlüsselbrett, am Fahrzeug. Als Fließtext in einer Tabellenspalte
   muss man es lesen; als Schild erkennt man es.

   Der EU-Sternenkranz fehlt bewusst: in reinem CSS kostet er entweder ein SVG
   je Vorkommen oder ein Dutzend Pseudo-Elemente, und das blaue Band mit dem D
   trägt den Wiedererkennungswert schon allein. Die Zeichenfolge wird
   unverändert ausgegeben und nicht in Kreis- und Erkennungsteil zerlegt: Der
   Bestand schreibt sie mal mit Bindestrich, mal mit Leerzeichen, und eine
   Zerlegung, die manchmal danebengreift, ist schlechter als keine. */
.licence-plate {
    display: inline-flex;
    align-items: stretch;
    overflow: hidden;
    background: #fff;
    color: #111;
    border: 2px solid #111;
    border-radius: 5px;
    font-family: "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
    font-weight: 700;
    line-height: 1;
    letter-spacing: .06em;
    text-transform: uppercase;
    white-space: nowrap;
    vertical-align: middle;
    font-size: .95rem;
}

/* Ein echtes Kennzeichen ist 520 × 110 mm, also deutlich breiter als hoch. Die vertikale
   Polsterung bleibt darum knapp; das D sitzt zentriert, weil ohne Sternenkranz unten nichts
   steht, worunter es sich ausrichten müsste. */
.licence-plate__eu {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #039;
    color: #fff;
    padding: 0 .35em;
    font-size: .62em;
    letter-spacing: 0;
}

.licence-plate__text {
    padding: .2em .55em;
}

/* Die Polsterung ist em-relativ und schrumpft damit mit der Schriftgröße — bei .8rem blieben
   rund 2 px, und das Schild sah gestaucht aus. Die kleine Größe bekommt deshalb mehr
   relative Höhe, die große weniger: Große Schrift braucht weniger Luft, um zu tragen. */
.licence-plate--sm { font-size: .95rem; border-width: 1.5px; border-radius: 4px; }
.licence-plate--sm .licence-plate__text { padding: .28em .55em; }

.licence-plate--lg { font-size: 1.6rem; border-width: 3px; border-radius: 7px; }
.licence-plate--lg .licence-plate__text { padding: .14em .55em; }

/* Ohne Fahrzeugschein-Kennzeichen — etwa ein Anhänger im Bestand ohne Eintrag. */
.licence-plate--empty { border-style: dashed; color: #6c757d; font-style: italic; }

.fleet-tabs.nav-underline {
    --bs-nav-link-color: var(--bs-secondary-color);
    --bs-nav-link-hover-color: var(--bs-body-color);
    --bs-nav-underline-gap: 1.5rem;
    --bs-nav-underline-link-active-color: var(--bs-body-color);
    align-items: flex-end;
    box-shadow: inset 0 -1px 0 var(--bs-border-color);
}

.fleet-tabs .nav-link.active {
    font-weight: 600;
    border-bottom-color: var(--bs-primary);
}

.fleet-tabs .nav-link:not(.active):hover {
    border-bottom-color: var(--bs-border-color);
}

/* So hoch wie ein kleiner Knopf, damit der Inhalt auf allen drei Seiten gleich hoch beginnt. */
.fleet-lead {
    min-height: 31px;
}

/* Auf dem Handy scrollt eine zu breite Reiterzeile in sich, statt die Seite zu verbreitern. */
@media (max-width: 575.98px) {
    .fleet-nav-scroll {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
    }

    .fleet-nav-scroll::-webkit-scrollbar {
        display: none;
    }

    .fleet-nav-scroll .nav-link {
        white-space: nowrap;
        font-size: .875rem;
    }

    .fleet-tabs.nav-underline {
        --bs-nav-underline-gap: 1rem;
    }

    /* Das Scrollen schneidet ab, was unter die Zeile ragt, auch den Rand, mit dem der aktive
       Reiter die Linie verdeckt. Die Linie liegt deshalb innerhalb der Zeile. */
    .fleet-nav-scroll.nav-tabs .nav-link {
        margin-bottom: 0;
    }

    .fleet-nav-scroll.card-header-tabs {
        margin-bottom: calc(-1 * (var(--bs-card-cap-padding-y) + var(--bs-card-border-width)));
    }
}

/* Bootstraps border-3 und border-<farbe> gelten für alle vier Seiten. */
.fleet-accent-danger { border-inline-start: 3px solid var(--bs-danger) !important; }
.fleet-accent-warning { border-inline-start: 3px solid var(--bs-warning) !important; }

/* Kopfzeile einer Fahrzeugkarte, hervorgehoben wie eine Zeile der Fahrzeugliste */
.card-header.fleet-card-head { background-color: var(--bs-body-bg); }
.card-header.fleet-card-head:hover { background-color: rgba(var(--bs-emphasis-color-rgb), .075); }

@media (min-width: 992px) {
    .fleet-scroll-lg {
        max-height: 24rem;
        overflow-y: auto;
    }
}

/* Kleine Symbolknöpfe bekommen auf Touch-Geräten eine größere Trefferfläche, ohne zu verrutschen. */
@media (pointer: coarse) {
    .fleet-touch {
        padding: .625rem !important;
        margin: -.625rem;
    }

    .fleet-touch-group {
        gap: 1.25rem !important;
    }
}
