/**
 * GridView — gemeinsame Styles für Backend und Frontend
 *
 * Sort-Icons: Yii2 setzt .asc/.desc als CSS-Klassen auf den <a>-Tag.
 * Die Icons werden per ::after-Pseudo-Element mit Bootstrap Icons eingebunden.
 * Voraussetzung: BootstrapIconsAsset ist geladen (via GridAsset).
 *
 * Column-Utilities: müssen auf <th> (headerOptions) und <td> (contentOptions)
 * gesetzt werden — nicht auf <col> (options), da width auf <col> bei
 * table-layout: auto (Bootstrap-Default) ignoriert wird.
 */

/* Sort-Icons */
a.asc::after,
a.desc::after {
    font-family: "bootstrap-icons";
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    padding-left: 4px;
    vertical-align: middle;
    font-size: 0.85em;
    opacity: 0.7;
}

a.asc::after {
    content: "\f57b"; /* bi-sort-up */
}

a.desc::after {
    content: "\f575"; /* bi-sort-down */
}

/* Tabellenkopf-Zeilen nicht umbrechen */
.grid-view th {
    white-space: nowrap;
}

/**
 * rib-col-fit
 * Spalte passt sich automatisch dem Inhalt an.
 * Ideal für Action-Buttons, Boolean-Spalten, kurze Status-Werte.
 * Horizontal-Padding reduziert – der Button-Padding reicht als Abstand zum Zellrand.
 */
.rib-col-fit {
    width: 1%;
    white-space: nowrap;
}

.table .rib-col-fit {
    padding-inline: 0.25rem;
}

/**
 * rib-col-date
 * Für Datum-Spalten mit Filter-Input.
 * min-width verhindert, dass der DatePicker-Input zu schmal wird.
 */
.rib-col-date {
    min-width: 110px;
    white-space: nowrap;
}
