/* Pagination DataTables 1.x (flaches <a class="paginate_button current">) */
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    color: #fff !important;
    border: 1px solid rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    margin-bottom: 3px;
    background: none !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    color: black !important;
    border: 1px solid white !important;
    border-radius: 20px;
    background: white !important;
}

/* Pagination DataTables 2 (BS5: li.dt-paging-button > .page-link) -- Optik wie 1.x nachgebaut.
   Inaktive Seitenzahlen dunkelgrau (BS5-Default waere Link-Blau), aktive Seite weisse Zahl in
   duenn umrandeter Pille auf dem gruenen Balken (Balken-Hintergrund kommt aus colors.css). */
div.dt-container div.dt-paging .dt-paging-button .page-link {
    color: #333 !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    border-radius: 2px !important;
    box-shadow: none !important;
}

div.dt-container div.dt-paging .dt-paging-button.active .page-link,
div.dt-container div.dt-paging .dt-paging-button.active .page-link:hover,
div.dt-container div.dt-paging .dt-paging-button.active .page-link:focus {
    color: #fff !important;
    background: transparent !important;
    border: 1px solid rgba(0, 0, 0, 0.3) !important;
    border-radius: 20px !important;
}

div.dt-container div.dt-paging .dt-paging-button:hover .page-link {
    color: #000 !important;
    background: #fff !important;
    border: 1px solid #fff !important;
    border-radius: 20px !important;
}

div.dt-container div.dt-paging .dt-paging-button.disabled .page-link,
div.dt-container div.dt-paging .dt-paging-button.disabled .page-link:hover {
    color: #666 !important;
    background: transparent !important;
    border-color: transparent !important;
}

/* DataTables 2: Layout der dom-Elemente wie in 1.x (Info links, Pagination rechts) --
   das alte jquery.dataTables.min.css hat die Elemente per float positioniert, DT2 tut das nicht mehr */
div.dt-container div.dt-info {
    clear: both;
    float: left;
    padding-top: .755em;
}

div.dt-container div.dt-paging {
    float: right;
    text-align: right;
    padding-top: .25em;
}

div.dt-container div.dt-length {
    float: right;
    text-align: right;
}

div.dt-container table.dataTable {
    clear: both;
}

/* DataTables 2 setzt einen dicken 3px-Rand unter den Scrollbereich (scrollX/scrollY-Tabellen,
   z.B. Screening). In 1.x war es eine duenne 1px-Linie wie beim Rest der Tabelle. */
div.dt-container div.dt-scroll-body {
    border-bottom: 1px solid rgba(0, 0, 0, 0.3);
}

/* DataTables 2 zeichnet keine Trennlinie mehr unter dem Tabellenkopf -- DT1 hatte
   thead th { border-bottom: 1px }. Nachbauen (Strich unter den Haendler-Spalten im Screening
   und unter den Kopfzeilen aller Listen). Die versteckte Header-Kopie im scroll-body bleibt
   unberuehrt, die setzt BS5 selbst auf border-bottom-width:0 !important. */
table.dataTable thead > tr > th,
table.dataTable thead > tr > td {
    border-bottom: 1px solid rgba(0, 0, 0, 0.3);
}

/* DataTables 2 bringt fuer die .cell-border-Klasse (Gitterlinien zwischen den Zellen, z.B. im
   Screening) kein Styling mehr mit -- 1:1 aus dem alten jquery.dataTables.min.css uebernommen */
table.dataTable.cell-border > tbody > tr > th,
table.dataTable.cell-border > tbody > tr > td {
    border-top: 1px solid rgba(0, 0, 0, 0.15);
    border-right: 1px solid rgba(0, 0, 0, 0.15);
}

table.dataTable.cell-border > tbody > tr > th:first-child,
table.dataTable.cell-border > tbody > tr > td:first-child {
    border-left: 1px solid rgba(0, 0, 0, 0.15);
}

table.dataTable.cell-border > tbody > tr:first-child > th,
table.dataTable.cell-border > tbody > tr:first-child > td {
    border-top: none;
}

/* DataTables 2: Suche linksbuendig wie in 1.x (DT2/BS5 richtet sie per text-align:right mittig aus) */
div.dt-container div.dt-search {
    text-align: left;
    /* DT1 hatte ~25px Abstand zwischen Buttons-Zeile und Filter/Length-Zeile
       (margin-top auf .dataTables_filter). In DT2 fehlt das, hier (und auf .dt-length)
       wiederherstellen. */
    margin-top: 25px;
}

div.dt-container div.dt-length {
    margin-top: 25px;
}

/* Such-Input und Laengen-Select als schlichte Box wie in DataTables 1.x (statt Material-Underline/BS5-Select) */
div.dt-container div.dt-search input {
    border: 1px solid #aaa !important;
    border-radius: 3px !important;
    padding: 5px !important;
    background-color: transparent;
    background-image: none !important;
    margin-left: 8.5px;
    width: 200px;
    display: inline-block;
    /* DT1 erbte hier 17px vom Container; DT2 nur 14px -> explizit setzen, damit das Feld
       wie im alten Stand aussieht (material-dashboard zwingt inputs auf font-size: inherit) */
    font-size: 17px;
}

div.dt-container div.dt-length select {
    border: 1px solid #aaa !important;
    border-radius: 3px !important;
    padding: 4px !important;
    background-color: transparent;
    background-image: none !important;
    width: auto;
    display: inline-block;
}

/* DataTables 2 richtet Zahlen-/Datumsspalten automatisch rechtsbuendig aus (dt-type-*);
   DataTables 1.x kannte das nicht -- altes linksbuendiges Verhalten wiederherstellen */
table.dataTable th.dt-type-numeric, table.dataTable td.dt-type-numeric,
table.dataTable th.dt-type-date, table.dataTable td.dt-type-date {
    text-align: left;
}

table.dataTable th.dt-type-numeric div.dt-column-header,
table.dataTable th.dt-type-numeric div.dt-column-footer,
table.dataTable th.dt-type-date div.dt-column-header,
table.dataTable th.dt-type-date div.dt-column-footer {
    flex-direction: row;
}

/* Processing-Overlay wie DataTables 1.x (material-dashboard + argusto/admin):
   halbtransparenter weisser Layer ueber die ganze Tabelle. DT2 nutzt .dt-processing statt
   .dataTables_processing, deshalb griffen die alten Regeln nicht mehr (DT2-Default war eine
   kleine Box mittig). z-index/sticky haelt den Text auch bei langen Tabellen im Blick.
   pointer-events: none -> der Layer blockiert keine Klicks; Filter bleiben waehrend des
   Tabellen-Ladens bedienbar (Verhalten wie in DataTables 1.x). */
div.dt-container div.dt-processing {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100%;
    margin: 0 !important;
    padding: 1em 0;
    text-align: center;
    background: #fff !important;
    opacity: 0.75;
    border: none;
    border-radius: 0;
    box-shadow: none;
    color: #333;
    font-weight: 600;
    z-index: 10;
    pointer-events: none;
}

/* DataTables 2 rendert zusaetzlich eine Punkte-Animation (div im Processing) -- in 1.x gab es
   nur den "Bitte warten..."-Text, daher ausblenden */
div.dt-container div.dt-processing > div {
    display: none;
}


.action-inline {
    display: inline-flex;
}


.sideway {
    transform: rotate(180deg);
    font-size: 18px;
    writing-mode: vertical-rl;
    min-height: 500px;
    min-width: 200px;

}

@-moz-document url-prefix() {
    .sideway {
        transform: none;
        font-size: 18px;
        writing-mode: sideways-lr;
    }
}

/**
Fixed Header
**/
table.fixedHeader-floating {
    background-color: white
}

table.fixedHeader-floating.no-footer {
    border-bottom-width: 0
}

table.fixedHeader-locked {
    position: absolute !important;
    background-color: white
}

@media print {
    table.fixedHeader-floating {
        display: none;
    }
    .box-body {
        padding: 0px;
    }
    thead {
        display: table-header-group;
        break-inside:avoid;
    }
    /* DataTables 2 packt die Tabelle in div.dt-container (position: relative) innerhalb von
       Bootstraps .table-responsive (overflow: auto). Firefox druckt von einem positionierten bzw.
       ueberlauf-beschnittenen Container, der hoeher als eine Seite ist, NUR die erste Seite -- der
       Rest bleibt weiss (Chrome druckt alle Seiten). Beides fuer den Druck neutralisieren, damit
       lange Tabellen (Checkliste/Einkaufsliste) ueber alle Seiten umbrechen und der per
       table-header-group wiederholte Tabellenkopf auf jeder Seite erscheint. */
    .table-responsive {
        overflow: visible !important;
    }
    div.dt-container {
        position: static !important;
        overflow: visible !important;
        height: auto !important;
    }
    #datatables.checkliste thead:before {
        content: attr(data-before);
        width: var(--pseudoWidth);
        display:inline-block;
        position: absolute;
        top: 0;
        left: 0;
        margin: auto;
        white-space: break-spaces;
    }
    #datatables.einkaufsliste thead:before {
        top: -24px;
    }

    #chkContainer div.dataTables_info,
    #chkContainer div.dt-info {
        padding-top: 2.6em;
        white-space: nowrap;
    }

    .main-panel > .content {
        margin-top: 10px;
    }
}

#datatables.checkliste td.dyn {
    max-width: fit-content!important;
    text-align: center;
}

#datatables.checkliste  {
    border-collapse: collapse!important;
}

#datatables.checkliste tr {
    border: 1px solid gainsboro;
}

.checkliste td pre {
    color: #2293e3!important;
    margin: 0px;
    line-height: initial;
    border: none;
    overflow-x: hidden;
    font-size: 16px!important;
    font-weight: 400!important;
}

#fontSizeChanger {
    display: inline-block!important;;
    width: auto!important;;
}
.tdimg {
    white-space: unset!important;
    padding: 0px!important;
    width: fit-content;
    width: -moz-fit-content;
}
.tdprice {
    white-space: normal!important;
}
pre.andere :not(.fresh,.old,.rotten){
    width: -moz-available;
    width: -webkit-fill-available;
    width: fill-available;
    float: left;
}

tr.dtrg-group {
    line-height: normal;
    padding-left: 15px!important;
}
.xsmall {
    font-size: small;
}
.dt-footer {
    width: 100%;
    float: left;
}

.HerstellerActionBadge {
    position: absolute;
    top: 0px;
    border: 1px solid #FFF;
    right: 0;
    font-size: 9px;
    background: #f44336;
    color: #FFFFFF;
    min-width: 20px;
    padding: 0px 5px;
    height: 20px;
    border-radius: 10px;
    text-align: center;
    line-height: 19px;
    display: block;
}

td.child > ul {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

td.child > ul > li {
    display: flex;
}

td.child .status_box {
    display: flex;
}

td.child .active_append {
    margin: 0 7px;
}

@media screen {
    #datatables.checkliste thead:before {
        content: '';
        display:inline-block;
    }
}

tr.is_inactive>td:has(.form-inline){
    opacity: 1;
}

.extra_filter .col {
    margin-right: 40px;
}

.extra_filter .col.ml-2.mr-2.mb-2 {
    margin-right: 60px !important;
}

@media screen and (max-width:565px) {
    .extra_filter .btn-group:not(.no-shrink) .filter_state {
        max-width: 114px;
        min-width: 114px;
        padding-right: 10px;
        padding-left: 10px;
    }
}

.checkliste .vpa {
    float: left;
    width: auto;
    margin: auto;
    color: black;
    background: lemonchiffon;
}

.checkliste .marke {
    float:left!important;
    font-weight: 600!important;
    color: inherit!important;
    width:-moz-available;
    width:-webkit-fill-available;
    width:fill-available;
}

.finished.material-icons {
    color: red!important;
}
.current.material-icons {
    color: var(--primaryCustom)!important;
}
.upcoming.material-icons {
    color: #7A7C7F!important;
}
