/* Absenzio Custom Styles */

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #f5f5f5;
}

/* Navigation Bar Styling */
.navbar {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.navbar-brand {
    font-weight: bold;
}

/* Sidebar Styling for Admin Pages */
.sidebar {
    min-height: calc(100vh - 56px);
    background-color: #343a40;
}

/* Main Content Area */
.main-content {
    flex: 1;
}

/* Card Styling */
.card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: none;
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #eee;
}

/* Action Buttons for Tables */
.btn-action {
    width: 32px;
    height: 32px;
    padding: 0;
    line-height: 32px;
    text-align: center;
}

/* Form Controls */
.form-control:focus, .form-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Footer */
.footer {
    margin-top: auto;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

/* Dashboard Stats */
.stats-card {
    transition: transform 0.2s ease;
}

.stats-card:hover {
    transform: translateY(-5px);
}

/* Badge Styling */
.badge {
    font-weight: normal;
    padding: 0.4em 0.8em;
}

/* Calendar Event Styling */
.fc-event {
    border: none;
    border-radius: 3px;
}

/* Responsive Table Adjustments */
@media (max-width: 768px) {
    .table-responsive {
        border: 0;
    }
}

/* Notification Badge */
.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    padding: .25em .4em;
    font-size: 75%;
    line-height: 1;
    border-radius: 10rem;
}

/* Comment Styling */
.comment-list {
    max-height: 500px;
    overflow-y: auto;
}

/* Custom NavBar with Primary Color */
.navbar-custom {
    background-color: #007bff;
}

.navbar-custom .navbar-brand,
.navbar-custom .navbar-text,
.navbar-custom .navbar-nav .nav-link {
    color: white;
}

/* Active Navigation Item */
.nav-item.active .nav-link {
    font-weight: bold;
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Admin Dashboard Icon Cards */
.icon-card {
    text-align: center;
    padding: 20px 0;
}

.icon-card i {
    font-size: 48px;
    margin-bottom: 15px;
}

/* Breadcrumb styling */
.breadcrumb {
    background-color: #f8f9fa;
    padding: 0.75rem 1rem;
    border-radius: 0.25rem;
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd;
    }
}

/* Custom container for smaller screens */
@media (min-width: 768px) {
    .container-narrow {
        max-width: 768px;
    }
}

/* Allgemeine Stile */

/* Landing Page Stile */
.transition {
    transition: all 0.3s ease;
}

.hover-shadow:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0dcaf0 100%);
}

.bg-opacity-10 {
    --bs-bg-opacity: 0.1;
}

.bg-primary.bg-opacity-10 {
    background-color: rgba(13, 110, 253, 0.1) !important;
}

.bg-success.bg-opacity-10 {
    background-color: rgba(25, 135, 84, 0.1) !important;
}

.bg-info.bg-opacity-10 {
    background-color: rgba(13, 202, 240, 0.1) !important;
}

.bg-warning.bg-opacity-10 {
    background-color: rgba(255, 193, 7, 0.1) !important;
}

/* Alert Styles - Consolidate all alert variants */
.alert {
    padding: 1rem !important;
    border-radius: 0.375rem !important;
    margin-bottom: 1rem !important;
    border: 1px solid transparent !important;
}

.alert-persistent {
    background-color: #d1ecf1 !important;
    border-color: #bee5eb !important;
    color: #0c5460 !important;
}

.alert-info {
    background-color: #d1ecf1 !important;
    border-color: #bee5eb !important;
    color: #0c5460 !important;
}

.alert-primary {
    background-color: #cfe2ff !important;
    border-color: #b6d4fe !important;
    color: #084298 !important;
}

.alert-success {
    background-color: #d4edda !important;
    border-color: #c3e6cb !important;
    color: #155724 !important;
}

.alert-warning {
    background-color: #fff3cd !important;
    border-color: #ffeaa7 !important;
    color: #856404 !important;
}

.alert-danger {
    background-color: #f8d7da !important;
    border-color: #f5c6cb !important;
    color: #721c24 !important;
}

.alert .alert-heading {
    font-weight: 600 !important;
    margin-bottom: 0.5rem !important;
}

.alert p {
    margin-bottom: 0 !important;
}

/* Mobile Navigation Optimierungen */
/* Bottom Navigation für Mobile */
.mobile-bottom-nav {
    background-color: #ffffff !important;
    border-top: 1px solid #dee2e6;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1020;
}

.mobile-bottom-nav .btn-link {
    border: none;
    background: none;
    transition: all 0.2s ease;
    border-radius: 8px;
    margin: 2px;
}

.mobile-bottom-nav .btn-link:hover,
.mobile-bottom-nav .btn-link:focus {
    background-color: rgba(13, 110, 253, 0.1) !important;
    color: #0d6efd !important;
    text-decoration: none;
    transform: scale(1.05);
}

.mobile-bottom-nav .btn-link:active {
    transform: scale(0.95);
}

/* Notification Badge Positioning für Mobile */
.mobile-bottom-nav .position-relative .badge {
    top: -2px !important;
    right: -2px !important;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem !important;
    padding: 0;
    line-height: 1;
}

/* Top Navbar Mobile Optimierungen */
@media (max-width: 991.98px) {
    .navbar-brand span {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .navbar .nav-link {
        padding: 0.5rem 0.75rem;
    }
    
    /* Badge für Notification in Top-Navbar */
    .navbar .position-relative .badge {
        font-size: 0.6rem;
        min-width: 14px;
        height: 14px;
        padding: 0;
        line-height: 1;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Dropdown-Menü für Mobile optimieren */
    .navbar .dropdown-menu {
        max-height: 70vh;
        overflow-y: auto;
        border-radius: 8px;
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    }
    
    .navbar .dropdown-header {
        font-size: 0.75rem;
        font-weight: 600;
        color: #6c757d;
        padding: 0.5rem 1rem 0.25rem;
    }
}

/* Container padding für Mobile Bottom Navigation */
@media (max-width: 991.98px) {
    .container {
        padding-bottom: 80px; /* Platz für Bottom Navigation */
    }
    
    /* Footer auch Platz machen */
    .footer {
        margin-bottom: 70px;
    }
}

/* Active State für Bottom Navigation */
.mobile-bottom-nav a.active,
.mobile-bottom-nav a[aria-current="page"] {
    color: #0d6efd !important;
    background-color: rgba(13, 110, 253, 0.1) !important;
}

/* Smooth transitions für alle Navigation Elements */
.navbar .nav-link,
.mobile-bottom-nav .btn-link {
    transition: all 0.2s ease-in-out;
}

/* Bessere Touch-Targets für Mobile */
@media (max-width: 767.98px) {
    .mobile-bottom-nav .btn-link {
        min-height: 44px; /* Apple's recommended minimum touch target */
        min-width: 44px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    
    .navbar .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

/* iPhone 14 und ähnliche Geräte Optimierungen */
@media (max-width: 393px) and (min-width: 361px) {
    .mobile-bottom-nav {
        padding: 0.2rem 0;
    }
    
    .mobile-bottom-nav .container-fluid {
        padding: 0 0.1rem;
    }
    
    .mobile-bottom-nav .btn-link {
        padding: 0.1rem 0.05rem;
        min-height: 40px;
        min-width: auto;
    }
    
    .mobile-bottom-nav small {
        font-size: 0.55rem !important;
        line-height: 1;
        margin-top: 1px;
    }
    
    .mobile-bottom-nav i {
        font-size: 0.95rem !important;
        margin-bottom: 2px !important;
    }
    
    /* Sicherstellen, dass alle Items in eine Zeile passen */
    .mobile-bottom-nav .row {
        margin: 0;
        display: flex;
        flex-wrap: nowrap;
    }
    
    .mobile-bottom-nav .col {
        padding: 0;
        flex: 1 1 0;
        min-width: 0;
        max-width: none;
    }
}

/* Safari auf iOS spezifische Fixes */
@supports (-webkit-touch-callout: none) {
    @media (max-width: 393px) {
        .mobile-bottom-nav {
            /* Safari auf iOS braucht manchmal extra Platz */
            padding-bottom: max(0.2rem, env(safe-area-inset-bottom));
        }
        
        .mobile-bottom-nav .btn-link {
            /* Verhindert, dass Buttons zu klein werden in Safari */
            flex-shrink: 0;
            word-break: keep-all;
        }
        
        .mobile-bottom-nav .row {
            /* Force equal width distribution */
            width: 100%;
        }
        
        .mobile-bottom-nav .col {
            /* Gleiche Breite für alle Spalten */
            flex: 1 1 auto;
            text-align: center;
        }
    }
}

/* Kleine Verbesserungen für sehr kleine Bildschirme */
@media (max-width: 360px) {
    .mobile-bottom-nav {
        padding: 0.15rem 0;
    }
    
    .mobile-bottom-nav .btn-link {
        padding: 0.05rem;
        min-height: 36px;
    }
    
    .mobile-bottom-nav small {
        font-size: 0.5rem !important;
    }
    
    .mobile-bottom-nav i {
        font-size: 0.85rem !important;
    }
    
    .navbar-brand {
        font-size: 0.9rem;
    }
    
    .navbar-brand span {
        max-width: 100px;
    }
}

/* Landscape Mode Optimierungen für Phones */
@media (max-height: 500px) and (orientation: landscape) {
    .mobile-bottom-nav {
        padding: 0.25rem 0;
    }
    
    .mobile-bottom-nav .btn-link {
        padding: 0.25rem;
    }
    
    .mobile-bottom-nav small {
        display: none; /* Verstecke Text im Landscape Mode */
    }
    
    .container {
        padding-bottom: 60px;
    }
}

/* High DPI Display Optimierungen */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .mobile-bottom-nav {
        border-width: 0.5px;
    }
}
