/* Mobile Navigation Styles */

/* ======================
   MOBILE HEADER
   ====================== */
.mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: white;
    z-index: 1030;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid #e5e5e5;
}

.mobile-header-content {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: relative;
}

.mobile-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    z-index: 1;
}

.mobile-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #2eb398;
    font-weight: 600;
    font-size: 1.2rem;
}

/* Mobile logo images - styles moved to logo-navigation.css */
.mobile-logo-img {
    display: block;
}

.mobile-logo-text-link {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-decoration: none;
    z-index: 1;
}

.mobile-logo-text {
    color: #2eb398;
    white-space: nowrap;
}

.mobile-profile {
    display: flex;
    align-items: center;
    gap: 15px;
    position: absolute;
    right: 20px;
}

.mobile-profile .profile-link {
    color: #2eb398;
    text-decoration: none;
    font-size: 1.5rem;
    transition: transform 0.2s ease;
}

.mobile-profile .profile-link:hover {
    transform: scale(1.1);
    color: #26a085;
}

.logout-form {
    margin: 0;
    padding: 0;
}

.logout-button {
    background: none;
    border: none;
    color: #2eb398;
    font-size: 1.5rem;
    padding: 0;
    cursor: pointer;
    transition: transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logout-button:hover {
    transform: scale(1.1);
    color: #26a085;
}

/* ======================
   MOBILE BOTTOM NAVIGATION
   ====================== */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: white;
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1020;
    height: 80px;
    margin: 0;
    padding: 0;
}

.bottom-nav-container {
    display: flex;
    height: 100%;
    width: 100%;
    max-width: none;
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #666 !important;
    transition: all 0.2s ease;
    padding: 10px 4px;
    position: relative;
    min-height: 80px;
}

.bottom-nav-item i {
    font-size: 1.5rem;
    margin-bottom: 6px;
    transition: all 0.2s ease;
    line-height: 1;
    color: #666 !important; /* Explizit grau für alle Icons */
}

.bottom-nav-item span {
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.1;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Default state - ensure all items start as gray */
.bottom-nav-item:not(.active) {
    color: #666 !important;
}

.bottom-nav-item:not(.active) i {
    color: #666 !important;
}

.bottom-nav-item:not(.active) span {
    color: #666 !important;
}

/* Spezifische Regel für Font Awesome Icons in Navigation */
.bottom-nav-item i.fas {
    color: inherit !important;
}

/* Spezifische Fix für Verwaltung Icon */
.bottom-nav-item[data-nav="verwaltung"]:not(.active) i.fa-users-cog {
    color: #666 !important;
}

/* Active state (when current page matches) - will be overridden by logo-navigation.css */
.bottom-nav-item.active,
.bottom-nav-item:hover {
    color: #2eb398 !important;
    background: rgba(46, 179, 152, 0.05);
}

.bottom-nav-item.active i,
.bottom-nav-item:hover i {
    color: #2eb398 !important;
    transform: scale(1.1);
}

.bottom-nav-item.active span,
.bottom-nav-item:hover span {
    color: #2eb398 !important;
    font-weight: 600;
}

/* Active indicator */
.bottom-nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: #2eb398;
    border-radius: 0 0 3px 3px;
}

/* ======================
   LAYOUT ADJUSTMENTS
   ====================== */
/* Mobile content spacing */
@media (max-width: 991.98px) {
    body {
        padding-top: 60px; /* Space for mobile header */
        padding-bottom: 100px; /* Extra Space for bottom navigation and card buttons */
    }
    
    .main-content {
        min-height: calc(100vh - 140px); /* Account for header and bottom nav */
    }
    
    .main-content-inner {
        padding-bottom: 20px;
    }
    
    /* Hide desktop elements on mobile */
    .desktop-header,
    .desktop-footer {
        display: none !important;
    }
}

/* Desktop adjustments */
@media (min-width: 992px) {
    body {
        padding-top: 0;
        padding-bottom: 0;
    }
    
    .main-content {
        min-height: auto;
        padding-bottom: 120px; /* Genug Platz für Footer + Sicherheitsabstand */
    }
    
    .main-content-inner {
        padding-bottom: 60px; /* Zusätzlicher Innenabstand */
    }
    
    /* Container-Elemente brauchen auch etwas mehr Abstand */
    .container:last-child {
        margin-bottom: 40px;
    }
    
    /* Spezielle Anpassung für Formular-Container */
    .row:last-child {
        margin-bottom: 60px;
    }
    
    /* Card-Container am Ende der Seite */
    .card:last-child {
        margin-bottom: 40px;
    }
    
    /* Hide mobile elements on desktop */
    .mobile-header,
    .mobile-bottom-nav {
        display: none !important;
    }
}

/* Für größere Bildschirme noch mehr Padding */
@media (min-width: 1200px) {
    .main-content {
        padding-bottom: 140px;
    }
    
    .main-content-inner {
        padding-bottom: 80px;
    }
}

/* Für sehr große Bildschirme */
@media (min-width: 1400px) {
    .main-content {
        padding-bottom: 160px;
    }
    
    .main-content-inner {
        padding-bottom: 100px;
    }
}

/* ======================
   RESPONSIVE OPTIMIZATIONS
   ====================== */
@media (max-width: 576px) {
    .mobile-header-content {
        padding: 0 15px;
    }
    
    .bottom-nav-item span {
        font-size: 0.7rem;
    }
    
    .bottom-nav-item i {
        font-size: 1.4rem;
    }
}

/* For very small screens, adjust spacing */
@media (max-width: 360px) {
    .bottom-nav-item span {
        font-size: 0.65rem;
        line-height: 1.0;
    }
    
    .bottom-nav-item {
        padding: 8px 2px;
    }
    
    .bottom-nav-item i {
        font-size: 1.3rem;
        margin-bottom: 4px;
    }
}

/* ======================
   FISCHERKARTEN-TABELLE KONTRAST-OPTIMIERUNG
   ====================== */
.fischerkarten-table {
    font-size: 0.95rem;
}

.fischerkarten-table .table-dark th {
    background-color: #212529 !important;
    color: #ffffff !important;
    border-color: #373a3d !important;
    font-weight: 700 !important;
}

.fischerkarten-table tbody tr {
    background-color: #ffffff !important;
}

.fischerkarten-table tbody tr:nth-of-type(odd) {
    background-color: #f8f9fa !important;
}

.fischerkarten-table tbody tr:hover {
    background-color: #e3f2fd !important;
    transition: background-color 0.2s ease;
}

.fischerkarten-table .table-success {
    --bs-table-bg: #d1edcc !important;
    background-color: #d1edcc !important;
}

.fischerkarten-table .table-warning {
    --bs-table-bg: #fff3cd !important;
    background-color: #fff3cd !important;
}

.fischerkarten-table td {
    vertical-align: middle;
    padding: 0.75rem !important;
    border-bottom: 1px solid #dee2e6 !important;
}

.fischerkarten-table .font-monospace {
    font-family: 'Courier New', monospace !important;
    background-color: #f8f9fa;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    border: 1px solid #dee2e6;
}

.fischerkarten-table .badge {
    font-size: 0.8rem !important;
    padding: 0.35rem 0.65rem !important;
}

.fischerkarten-table .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    min-width: 35px;
}

/* Mobile Responsive für Fischerkarten-Tabelle */
@media (max-width: 768px) {
    .fischerkarten-table {
        font-size: 0.85rem;
    }
    
    .fischerkarten-table th,
    .fischerkarten-table td {
        padding: 0.5rem !important;
    }
    
    .fischerkarten-table .btn-sm {
        padding: 0.2rem 0.4rem;
        font-size: 0.8rem;
        min-width: 32px;
    }
    
    .fischerkarten-table .badge {
        font-size: 0.7rem !important;
        padding: 0.25rem 0.5rem !important;
    }
}

/* ======================
   FANG-CARDS MOBILE OPTIMIERUNG
   ====================== */
.fang-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fang-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15) !important;
}

/* Mobile optimierte Fang-Cards */
@media (max-width: 768px) {
    .fang-card {
        min-height: 200px; /* Mindesthöhe für Button-Sichtbarkeit */
        margin-bottom: 1rem;
    }
    
    .fang-card .card-body {
        min-height: 180px; /* Sicherstellt dass Buttons sichtbar sind */
        padding: 1rem !important;
    }
    
    .fang-card .btn-group {
        margin-top: 0.5rem;
        margin-bottom: 0.5rem; /* Extra Abstand unten */
    }
    
    .fang-card .btn-sm {
        padding: 0.375rem 0.5rem;
        font-size: 0.9rem;
        min-height: 38px; /* Mindesthöhe für Touch-Targets */
    }
    
    /* Sicherstellen dass Cards nicht zu hoch werden */
    .fang-card .card-text {
        max-height: 3rem;
        overflow: hidden;
    }
}

/* Sehr kleine Bildschirme */
@media (max-width: 576px) {
    .fang-card {
        min-height: 180px;
    }
    
    .fang-card .card-body {
        min-height: 160px;
        padding: 0.75rem !important;
    }
    
    .fang-card .btn-sm {
        padding: 0.25rem 0.4rem;
        font-size: 0.85rem;
        min-height: 36px;
    }
    
    /* Button-Icons etwas größer für bessere Touch-Targets */
    .fang-card .btn i {
        font-size: 1.1em;
    }
}

/* ======================
   MOBILE STATISTIK-KARTEN OPTIMIERUNG
   ====================== */
@media (max-width: 768px) {
    /* Statistik-Karten kompakter auf Mobile */
    .card .card-body.p-3 {
        padding: 0.75rem !important;
    }
    
    /* Kleinere Titel auf Mobile */
    .card .card-title.small {
        font-size: 0.8rem !important;
        margin-bottom: 0.25rem !important;
        font-weight: 600;
    }
    
    /* Kompaktere Zahlen auf Mobile */
    .card h4, .card h5 {
        /*margin-bottom: 0 !important;*/
        line-height: 1.2;
    }
    
    /* Statistik-Karten gleiche Höhe auf Mobile */
    .row .col-6 .card {
        min-height: 80px;
        display: flex;
        align-items: center;
    }
    
    .row .col-6 .card .card-body {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

/* Noch kompakter für sehr kleine Bildschirme */
@media (max-width: 375px) {
    .card .card-body.p-3 {
        padding: 0.5rem !important;
    }
    
    .card .card-title.small {
        font-size: 0.75rem !important;
    }
    
    .card h4 {
        font-size: 1.1rem !important;
    }
    
    .card h5 {
        font-size: 1rem !important;
    }
    
    .row .col-6 .card {
        min-height: 70px;
    }
}

/* ======================
   DESKTOP NAVIGATION ACTIVE STATE
   ====================== */
/* Desktop active navigation styles moved to logo-navigation.css */
/* This ensures proper cascading and avoids conflicts */

/* ======================
   ACCESSIBILITY
   ====================== */
.bottom-nav-item:focus,
.mobile-logo:focus,
.profile-link:focus {
    outline: 2px solid #2eb398;
    outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .bottom-nav-item,
    .bottom-nav-item i,
    .bottom-nav-item span,
    .profile-link {
        transition: none;
    }
}

/* ======================
   SAFARI BOTTOM SAFE AREA
   ====================== */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .mobile-bottom-nav {
        padding-bottom: env(safe-area-inset-bottom);
        height: calc(80px + env(safe-area-inset-bottom));
    }
    
    @media (max-width: 991.98px) {
        body {
            padding-bottom: calc(100px + env(safe-area-inset-bottom));
        }
    }
}
