﻿/* Feste Buttonbreiten */
.btn-sm-fixed {
    width: 80px;
}

.btn-md-fixed {
    width: 120px;
}

.btn-lg-fixed {
    width: 160px;
}

/* Scrollbare Container */
.scroll-y {
    overflow-y: auto;
    max-height: 400px;
}

.scroll-x {
    overflow-x: auto;
}

/* Textgrößen */
.text-small {
    font-size: 0.875rem;
}

.text-large {
    font-size: 1.25rem;
}

/* Universelles Truncate-Utility */

/* Basis: funktioniert auf span/div/etc. */
.truncate {
    display: inline-block; /* Block-Kontext für overflow */
    white-space: nowrap; /* kein Umbruch */
    overflow: hidden; /* Überlauf abschneiden */
    text-overflow: ellipsis; /* "…" anzeigen */
    vertical-align: middle; /* saubere Ausrichtung in Tabellen */
    max-width: var(--truncate-width, 150px); /* Default-Breite, variabel via CSS-Variable */
}

/* Variante für direkte Anwendung auf Tabellenzellen 
    Es funktioniert nur die "nowrap" variante
*/
/*
    Beispiel
    <span class="truncate" style="--truncate-width:120px;">
                    SehrLangerArtikelnameDerNichtUmgebrochenWerdenSoll
                </span>
*/

td.truncate, th.truncate {
    white-space: nowrap;
}

/* Breitenvarianten */
/* Beispiel für Anwendung in tabellen-Zeilen: 
    <td class="truncate truncate-200">@tenant.DisplayName</td>*/
    .truncate-60 {
    --truncate-width: 60px;
}

.truncate-70 {
    --truncate-width: 70px;
}

.truncate-80 {
    --truncate-width: 80px;
}
.truncate-100 {
    --truncate-width: 100px;
}
.truncate-120 {
    --truncate-width: 120px;
}
.truncate-150 {
    --truncate-width: 150px;
}

.truncate-200 {
    --truncate-width: 200px;
}

/* Abstände */
.mt-1rem {
    margin-top: 1rem;
}

.mb-1rem {
    margin-bottom: 1rem;
}

/* Tabellen */
.table-compact td,
.table-compact th {
    padding: 0.25rem 0.25rem;
    font-size: 0.875rem;
}

.table-nowrap td,
.table-nowrap th {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    white-space: nowrap; /* kein automatischer Zeilenumbruch */
    overflow: hidden; /* alles, was nicht reinpasst, wird abgeschnitten */
    /*text-overflow: ellipsis;*/ /* zeigt "…" am Ende an */
    max-width: 150px; /* Spalte auf feste/maximale Breite begrenzen */
}
