/* ==========================================================================
   1. DESIGN-SYSTEM (Zentrale Variablen für Konsistenz)
   ========================================================================== */
:root {
    /* Farben */
    --primary-color: #9bc4e2; /* Dein Lila */
    --primary-hover: #87cefa;
    --secondary-color: #6495ED; /* Dein Blau */
    --accent-red: #ff0000;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --text-main: #333333;
    --text-muted: #666666;
    --border-color: #dddddd;
    /* Abstände & Rundungen */
    --radius-lg: 1rem;
    --radius-md: 0.5rem;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    font-size: 14px;
    /* Standard-Schriftgröße */
}

/* ==========================================================================
   2. GLOBALER RESET & LAYOUT-STRUKTUR
   ========================================================================== */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.5; /* Verbessert die Lesbarkeit massiv */
}


body {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden; /* Haupt-Body scrollt nicht */
    background-image: url('/Images/AppBilder/BackgroundPflege.png');
    background-position: center top;
    background-size: cover;
    background-attachment: local;
}

/* Haupt-Container-Struktur */
#layout-root {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.btn-primary-app {
    background-color: var(--primary-color);
    border: none;
    padding: 0.6rem 1.5rem;
    font-size: 1.5rem;
    font-weight: bold;
    border-radius: 1rem;
    transition: transform 0.2s;
    text-decoration: none;
    color: #2F4F4F
}

    .btn-primary-app:hover {
        transform: scale(1.05);
        background-color: var(--secondary-color);
        color: white;
    }

header, footer {
    flex: 0 0 auto;
    background-color: var(--bg-white);
    z-index: 1000;
}

#main-content-wrapper {
    flex: 1;
    overflow-y: auto; /* Nur hier wird gescrollt */
    -webkit-overflow-scrolling: touch;
}

.button_CardFarbe {
    background-color: var(--primary-color);
    color: #2F4F4F;
    font-weight: bold;
}

/* scrollbar verstecken */
/* Eine Klasse für den Container erstellen */
.no-scrollbar {
    /* 1. Für Chrome, Safari und Opera */
    -webkit-overflow-scrolling: touch; /* Sanftes Scrollen auf iOS */
}

    .no-scrollbar::-webkit-scrollbar {
        display: none; /* Versteckt die Scrollbar komplett */
    }

/* 2. Für Firefox */
.no-scrollbar {
    scrollbar-width: none; /* Versteckt die Scrollbar */
}

/* 3. Für Internet Explorer und Edge (alt) */
.no-scrollbar {
    -ms-overflow-style: none;
}
.scroll-container {
    /* 70% der verfügbaren Displayhöhe */
    height: 70vh;
    /* Falls der Inhalt kleiner ist, wächst der Div nur bis 70% */
    /* max-height: 70vh; */
    /* Aktiviert vertikales Scrollen, falls der Inhalt zu lang ist */
    overflow-y: auto;
    /* Optik (optional) */
    border: 1px solid #ccc;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

    /* Optional: Den Scrollbalken für moderne Browser etwas schöner machen */
    .scroll-container::-webkit-scrollbar {
        width: 8px;
    }

    .scroll-container::-webkit-scrollbar-thumb {
        background: #888;
        border-radius: 4px;
    }
/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Styling für Datatables*/
/* 1. Das Suchfeld (f) verschönern */
.dataTables_filter {
    margin-bottom: 0.5rem;
}

    .dataTables_filter input {
        border: 1px solid forestgreen; /* Blaues Gehäuse */
        border-radius: 50px; /* Abgerundet (Pill-Look) */
        padding: 6px 15px;
        margin-left: 10px;
        outline: none;
        transition: all 0.3s;
    }

        .dataTables_filter input:focus {
            box-shadow: 0 0 10px forestgreen;
            width: 250px; /* Dehnt sich beim Klicken leicht aus */
        }

    .dataTables_filter label {
        font-size: 0px !important;
    }

/* 2. Die Info-Anzeige "Seite X von Y" (i) stylen */
.dataTables_info {
    color: white;
    background-color: var(--primary-color);
    font-size: 0.9rem;
    padding-top: 1rem !important;
}

/* 3. Die Pagination (Seitenzahlen) (p) stylen */
.dataTables_paginate {
    padding-top: 0.9rem !important;
}

.paginate_button {
    border-radius: 5px !important;
    border: 1px solid var(--primary-color) !important;
    margin-left: 0.3rem !important;
    background-color: var(--primary-color)
}

    .paginate_button.current {
        background: var(--primary-color);
        color: white !important;
        border-color: forestgreen;
    }

/* 4. Das Dropdown für die Zeilenanzahl (l) */
.dataTables_length select {
    width: auto !important; /* Nur so breit wie der Inhalt */
    display: inline-block;
    padding-right: 1.5rem !important; /* Platz für den Pfeil */
    padding-left: 0.5rem !important;
    margin: 0 5px; /* Abstand zum Text "Einträge anzeigen" */
    border-radius: 4px;
    border: 1px solid var(--primary-color);
}
/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Mobil-Optimierung: Elemente untereinander stapeln */


/* ==========================================================================
   4. RESPONSIVE ANPASSUNGEN (Mobile First)
   ========================================================================== */
/*
 * MOBILE-FIRST MEDIA QUERIES
 * Die Breakpoints sind hier so gewählt, dass sie auf die effektiven Viewport-Breiten reagieren,
 * auch wenn das Betriebssystem skaliert.
 */
@media (max-width: 380px) {
    :root {
        font-size: 11px;
    }
}

@media (min-width: 576px) {
    :root {
        font-size: 12px;
    }

    .centered-image {
        max-height: 40vh; /* Etwas größer auf größeren Handys */
    }

    .cookie-banner {
        width: 85%;
        padding: 25px;
        gap: 15px;
    }

        .cookie-banner button {
            padding: 10px 20px;
            min-width: 150px;
        }
}
/* Medium devices (tablets, 768px and up) */


@media (max-width: 768px) {
    .dataTables_filter, .dataTables_length, .dataTables_info, .dataTables_paginate {
        text-align: center !important;
        float: none !important;
        display: block !important;
        margin: 0.7rem auto !important;
    }

        .dataTables_filter input {
            width: 90% !important;
            margin-left: 0 !important;
        }
}



/* TABLETS (Ab 768px) */
@media (min-width: 768px) {
    :root {
        font-size: 13px;
    }

    .grid-card {
        flex: 0 0 300px;
    }
}
/* KLEINE LAPTOPS / DESKTOP (Ab 1024px) */
@media (min-width: 1024px) {

    :root {
        font-size: 13px;
    }
}
/* GROSSE MONITORE (Ab 1440px) */
@media (min-width: 1440px) {
    :root {
        font-size:14px;
    }
}
/* DRUCK-EINSTELLUNGEN */
@media print {
    .no-print {
        display: none !important;
    }

    #main-content-wrapper {
        overflow: visible;
    }

    body {
        background: white;
    }
}
