html {
  overflow-x: hidden;
  overflow-y: scroll;
}

body {
    padding-top: 60px;
    padding-bottom: 10px;
}

.navbar-nav .nav-link {
    font-size: 12px;
}

h1, h2, h3, h4, h5 {
    color: #ff9900;
}

body.auth {
    padding-top: 10px;
    padding-bottom: 10px;
}

.fa-2x, .fa-3x {
  vertical-align: middle;
}

table tr.odd {
    background-color: #fbfaf7;
}

select.form-control[size], select.form-control[multiple] {
    height: 180px;
}

.card, .invalid-feedback {
    display: block;
}

.dotted {
    border-bottom: 1px dotted;
}

.tooltip {
    text-transform: none;
    line-height: initial;
}

/*
textarea.form-control {
    height: auto !important;
}
*/

div.card-header button.btn.btn-link {
    text-align: left;
}

div.card-header a.btn {
    float: right;
    margin: 0 2px;
}

div.card-body {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

div.form-group {
    margin-bottom: 0.5rem;
}

#control-bar {
    position: sticky;
    bottom: 0;
    z-index: 50;
    padding-bottom: 10px;
    padding-top: 5px;
    margin: 0;
    width: 100vw;
    background: #fff;
    box-shadow: -10px 0 white;
    /*overflow:hidden;*/
}

/* for crispy forms 1.8 - does not work
.custom-file-input ~ .custom-file-label::after {
    content: "Datei auswählen";
}
*/

div.container.my-4 > div > details > details {
    margin-left: 15px;
}


#cookiemessage {
   position: sticky;
   bottom: 0px;
   width: 100%;
   z-index: 10000;
}

#session-timeout-dialog.modal.fade.show button.close, #session-timeout-dialog-logout {
    display: none;
}


/*div#div_id_themen.form-group div {*/
div.form-group > div:has(div > input[type=checkbox]) {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); /* Dynamische Spaltenanzahl */
    gap: 2px; /* Abstand zwischen den Elementen */
    overflow-y: auto; /* Vertikales Scrollen aktivieren */
    /*height: calc(15 * 1.2em);*/ /* Höhe des Containers */
    max-height: calc(15 * 1.2em); /* Maximale Höhe des Containers */
    resize: vertical; /* Ermöglicht vertikales Resizing */
    padding: 2px 5px; /* Innenabstand */
    border: 1px solid #ccc; /* Rahmen für den Container */
    border-radius: 5px; /* Abgerundete Ecken */
}

/* fuer MA-Aufgaben standardmaessig nur 3 Spalten */
div.mitarbeiter-aufgaben-form.form-group div.form-group > div:has(div > input[type=checkbox]) {
    grid-template-columns: repeat(auto-fill, minmax(333px, 1fr)); /* Dynamische Spaltenanzahl */
}

/* resets max-height of checkbox-container if height is resized manually by user */
div.form-group > div:has(div > input[type=checkbox])[style*="height"] {
    max-height: unset;
}

/* Die Labels der Checkboxen werden nach einer bestimmten Laenge abgeschnitten und mit drei Punkten versehen */
/*div.form-group>div:has(input[type=checkbox])>*/
div.form-group > div:has(div > input[type=checkbox]) > div.form-check > label.form-check-label {
    display: block; /* Damit das Label als Blockelement behandelt wird */
    /*width: 200px;*/ /* Feste Breite, anpassen nach Bedarf */
    overflow: hidden; /* Versteckt den überflüssigen Text */
    white-space: nowrap; /* Verhindert Zeilenumbrüche */
    text-overflow: ellipsis; /* Fügt die drei Punkte hinzu */
    position: relative; /* Positionierung für das Pseudo-Element */
}

/* Beschreibungen mit <small> nutzen die gesamte Breite des Grids*/
div.form-group > div:has(div > input[type=checkbox]) > small {
    grid-column: 1 / -1;
}

/* Überschreiben der maximalen Höhe für das geschachtelte Checkboxen-Forms, wie z.B. das Aufgaben-Form */
div.form-group > div.checkbox-form-container:has(div > input[type=checkbox]) {
    grid-template-columns: 1fr;
    max-height: calc(30 * 1.2em); /* Maximale Höhe des Containers */
}

/* resets max-height of checkbox-container if height is resized manually by user */
div.form-group > div.checkbox-form-container:has(div > input[type=checkbox])[style*="height"] {
    max-height: unset;
}

/* Überschriften der geschachtelten Checkbox-Container fett */
div.form-group > div.checkbox-form-container > details > summary {
    font-weight: bold;
}

/* Checkboxen vertikal mittig ausrichten */
.form-check-label {
    margin-top: 0.1rem;
}
/*
div.form-group div.form-check {
    display: flex;
    align-items: center;
}
div.form-group div.form-check .form-check-input {
    margin-top: auto;
}*/

/* Zwischenabstaende in geschachtelten Checkbox-Containern unterbinden */
div.form-group div.form-group {
    margin-bottom: 0.0rem;
}


/* roten Rand fuer invalide Select-Boxen */
.is-invalid .select2-container--default .select2-selection--single {
    border-color: #d9534f;
}

/* Abstaende in Select-Boxen verkleinern */
div.form-group span.selection span.select2-selection--multiple {
    padding-bottom: 4px;
}
div.form-group span.selection ul li.select2-selection__choice {
    margin-top: 4px;
}
div.form-group span.selection ul li.select2-selection__choice span.select2-selection__choice__display {
    padding-right: 4px;
}
/* Deaktivierte Select-Boxen brauchen keinen Abstand nach links */
div.form-group span.select2-container--disabled span.selection ul li.select2-selection__choice {
    padding-left: 2px;
}

/* Fehler in MA Projektzuordnungen ausblenden, da sie separat gerendert werden - Unterdrückung klappt wg. cripy-forms nicht */
.aufgaben-form.form-group .checkbox-form-container .alert.alert-block.alert-danger {
    display: none;
}
