/* Rounded Table Styles - passend zu den Buttons mit 1rem border-radius */

/* Einfacher Ansatz: Wrapper mit overflow hidden für runde Ecken */
.table-rounded-wrapper {
    border-radius: 1rem;
    overflow: hidden;
    border: var(--bs-border-width) solid var(--bs-border-color);
}

.table-rounded-wrapper > .table {
    margin-bottom: 0;
    border: none;
    border-radius: 0;
}

/* Direkte Anwendung auf Tabellen ohne Wrapper */
.table-rounded {
    border-radius: 1rem !important;
    overflow: hidden;
}

/* Für Tabellen in Cards - Anpassung der Ecken */
.card > .table-rounded:first-child,
.card > .table-responsive:first-child > .table-rounded {
    border-top-left-radius: calc(var(--bs-card-inner-border-radius) - 1px);
    border-top-right-radius: calc(var(--bs-card-inner-border-radius) - 1px);
}

.card > .table-rounded:last-child,
.card > .table-responsive:last-child > .table-rounded {
    border-bottom-left-radius: calc(var(--bs-card-inner-border-radius) - 1px);
    border-bottom-right-radius: calc(var(--bs-card-inner-border-radius) - 1px);
}

/* Responsive Tabellen mit abgerundeten Ecken */
.table-responsive-rounded {
    border-radius: 1rem;
    overflow: auto; /* nicht hidden, damit Scrolling funktioniert */
    border: var(--bs-border-width) solid var(--bs-border-color);
}

.table-responsive-rounded > .table {
    margin-bottom: 0;
}

/* DataTables spezifische Anpassungen */
.dataTables_wrapper .table-rounded {
    border-radius: 1rem !important;
    overflow: hidden;
}

/* Fix für DataTables mit border */
.dataTables_wrapper .table-rounded.table-bordered {
    border: var(--bs-border-width) solid var(--bs-border-color) !important;
    border-radius: 1rem !important;
}

/* Utility-Klassen für verschiedene Rundungsgrade */
.table-rounded-sm,
.table-rounded-sm.table,
.table-rounded-wrapper.rounded-sm {
    border-radius: 0.5rem !important;
}

.table-rounded-lg,
.table-rounded-lg.table,
.table-rounded-wrapper.rounded-lg {
    border-radius: 1.5rem !important;
}

/* Fix für DataTables Scrolling - deaktiviert, siehe table-horizontal-scroll.css */
/* Alle Scrolling-spezifischen Styles sind in table-horizontal-scroll.css */

/* Anpassung für kleine Bildschirme */
@media (max-width: 576px) {
    .table-rounded,
    .table-rounded-wrapper,
    .table-responsive-rounded,
    .table-rounded-lg,
    .table-rounded-wrapper.rounded-lg {
        border-radius: 0.75rem !important;
    }
    
    .table-rounded-sm,
    .table-rounded-wrapper.rounded-sm {
        border-radius: 0.375rem !important;
    }
}