/**
 * CSS for exsys_wawi
 * 
 * @license Commercial
 */


/* 
 * Select 2 Boostrap 5 Layout 
 */
.select2-container--default .select2-selection--single {
	border-color:#ebebeb;
	padding:28px 0px 28px 4px;
}
.select2-container .select2-selection--single .select2-selection__rendered {
	margin-top:-5px;
	padding-right:8px;
}


/* ══════════════════════════════════════════════════════════════════════════════
   WaWi DataTable-Erweiterungen (WawiDataTable)
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── Einzeilige Toolbar (Titel | Length | Colvis | Suche | Button) ──────── */
.wawi-toolbar {
    display:     flex;
    align-items: center;
    gap:         8px;
    flex-wrap:   wrap;
}

.wawi-toolbar h4 {
    font-size:   1.1rem;
    font-weight: 600;
    white-space: nowrap;
    margin:      0;
}

/* DataTables-Controls in der Toolbar: Float entfernen, Label-Margin entfernen */
.wawi-toolbar .dataTables_length,
.wawi-toolbar .dataTables_filter {
    float:  none !important;
    margin: 0 !important;
}

.wawi-toolbar .dataTables_length label,
.wawi-toolbar .dataTables_filter label {
    margin:      0;
    white-space: nowrap;
    font-weight: normal;
}

/* Globales Suchfeld: gleiche Höhe wie die anderen Buttons */
.wawi-toolbar .dataTables_filter input {
    height:    31px;
    font-size: .875rem;
    padding:   4px 8px;
}

/* Length-Select: kompakt */
.wawi-toolbar .dataTables_length select {
    height:    31px;
    font-size: .875rem;
    padding:   4px 6px;
}

/* Info + Pagination unterhalb der Tabelle */
.wawi-dt-bottom {
    display:         flex;
    justify-content: space-between;
    align-items:     center;
    margin-top:      10px;
}

/* Fallback: falls toolbarLength/toolbarFilter nicht genutzt werden */
.wawi-dt-controls {
    display:     flex !important;
    align-items: center;
    gap:         8px;
    flex-wrap:   wrap;
    margin-bottom: 10px;
}

.wawi-dt-controls .dataTables_length,
.wawi-dt-controls .dataTables_filter {
    float:  none !important;
    margin: 0 !important;
}

.wawi-dt-controls .dataTables_filter {
    margin-left: auto !important;
}

/* ── colvis-Dropdown ────────────────────────────────────────────────────── */
.wawi-dt-colvis-menu {
    position:      absolute;
    top:           calc(100% + 2px);
    left:          0;
    z-index:       1055;
    min-width:     180px;
    padding:       6px 0;
    background:    #fff;
    border:        1px solid rgba(0,0,0,.15);
    border-radius: .375rem;
    box-shadow:    0 .5rem 1rem rgba(0,0,0,.15);
    list-style:    none;
    margin:        0;
}

.wawi-cv-label {
    display:     flex;
    align-items: center;
    gap:         8px;
    padding:     5px 14px;
    font-size:   .875rem;
    cursor:      pointer;
    white-space: nowrap;
    margin:      0;
    font-weight: normal;
}

.wawi-cv-label:hover {
    background-color: #f0f2f5;
}

.wawi-cv-cb {
    cursor: pointer;
    margin: 0;
}

/* ── Spaltensuche-Zeile ─────────────────────────────────────────────────── */
.wawi-dt-search-row th {
    background-color: #f0f2f5;
    padding:          4px !important;
    border-bottom:    2px solid #dee2e6;
}

/* Wrapper: position:relative damit der ×-Button absolut darin positioniert wird */
.wawi-dt-input-wrap {
    position: relative;
}

.wawi-dt-col-input {
    height:        26px;
    padding:       2px 20px 2px 6px; /* rechts Platz für × */
    font-size:     .78rem;
    min-width:     40px;
    width:         100%;
    box-sizing:    border-box;
}

.wawi-dt-col-input:focus {
    border-color: #86b7fe;
    box-shadow:   0 0 0 .15rem rgba(13,110,253,.2);
}

/* × innerhalb des Suchfeldes (absolut positioniert) */
.wawi-dt-col-clear {
    position:   absolute;
    right:      4px;
    top:        50%;
    transform:  translateY(-50%);
    background: none;
    border:     none;
    padding:    0 2px;
    cursor:     pointer;
    color:      #adb5bd;
    font-size:  .9rem;
    line-height: 1;
    transition: color .15s;
}

.wawi-dt-col-clear:hover {
    color: #495057;
}

/* Reset-Button in Actions-<th> der Suchzeile */
.wawi-dt-reset-all {
    font-size:   .75rem;
    padding:     2px 6px;
    height:      26px;
    white-space: nowrap;
}
/* ── Positions-Bemerkungszeile (intern, nicht auf Dokumenten) ───────────── */
.pos-bm-row td {
    background-color: #fff9c4 !important;
}
.pos-bm-row .pos-bem {
    font-style:       italic !important;
    background-color: transparent !important;
}

/* ── Positions-Bezeichnung (pos-bez) als Textarea ───────────────────────── */
/* Sieht wie ein einzeiliges Textfeld aus; wächst bei Mehrfach-Bezeichnungen */
textarea.pos-bez {
    resize:         none;
    overflow:       hidden;
    min-height:     calc(1.5em + 0.5rem + 2px); /* Bootstrap form-control-sm Höhe */
    line-height:    1.5;
    padding-top:    0.25rem;
    padding-bottom: 0.25rem;
    field-sizing:   content; /* Chrome 123+, Firefox 128+: auto-grow ohne JS */
}


/* Alternative Darstellung mit Label halb im Formfeld */
.form-group {
	position:relative;
	padding-bottom:1.5rem;
}

.form-group .form-label {
	font-size:16px;
	line-height:16px;
	position:absolute;
	z-index:10;
	left:10px; top:-8px;
	background-color:#F4F4F4;
	padding:0px 5px 0px 5px;
}

.form-control::not(textarea),
select.form-control,
select.form-control[multiple], 
select.form-control[size] {
	height: calc(1.6em + .75rem + 2px);
	padding: .475rem .75rem .375rem .75rem;
}