/* Base Template Styles for KermanBana */

/* Desktop Header */
.desktop-header {
    background: #ffffff !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0.25rem 0;
}

.desktop-header .navbar-brand {
    color: #2c3e50 !important;
    font-size: 1.3rem;
    font-weight: 700;
    text-decoration: none;
}

.desktop-header .navbar-brand:hover {
    color: #007bff !important;
    transform: scale(1.05);
    transition: all 0.3s ease;
}

.desktop-header .navbar-brand small {
    color: #6c757d;
    font-weight: 400;
}

.desktop-header .nav-link {
    color: #2c3e50 !important;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.4rem 0.8rem;
    margin: 0 0.2rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.desktop-header .nav-link:hover {
    color: #007bff !important;
    background-color: rgba(0, 123, 255, 0.1);
    transform: translateY(-1px);
}

.desktop-header .nav-link i {
    font-size: 1rem;
}

.desktop-header .dropdown-toggle::after {
    border-top-color: #2c3e50 !important;
    margin-right: 0.5rem;
}

.desktop-header .dropdown-menu {
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
    margin-top: 0.5rem;
}

.desktop-header .dropdown-item {
    color: #2c3e50;
    font-weight: 500;
    padding: 0.6rem 1.2rem;
    transition: all 0.3s ease;
}

.desktop-header .dropdown-item:hover {
    background-color: #f8f9fa;
    color: #007bff;
    transform: translateX(3px);
}

.desktop-header .dropdown-item i {
    color: #6c757d;
    width: 18px;
}

/* Mobile Header */
.mobile-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e9ecef;
    padding: 0.5rem 0;
}

.mobile-header .navbar-brand {
    font-weight: 700;
    color: #2c3e50;
    font-size: 1.1rem;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e9ecef;
    padding: 6px 0 8px 0;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    display: none;
    width: 100%;
}

.bottom-nav-item {
    text-decoration: none;
    color: #6c757d;
    transition: all 0.3s ease;
    padding: 6px 8px;
    border-radius: 8px;
    margin: 0 1px;
    position: relative;
    overflow: hidden;
    min-height: 45px;
}

.bottom-nav-item:hover {
    color: #2c3e50;
    background: #f8f9fa;
    text-decoration: none;
    transform: translateY(-1px);
}

.bottom-nav-item.active {
    color: #2c3e50;
    background: #e9ecef;
    text-decoration: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.bottom-nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 25px;
    height: 2px;
    background: #2c3e50;
    border-radius: 0 0 10px 10px;
}

.bottom-nav-icon {
    font-size: 1rem;
    margin-bottom: 2px;
    display: block;
    transition: transform 0.3s ease;
}

.bottom-nav-item:hover .bottom-nav-icon {
    transform: scale(1.05);
}

.bottom-nav-label {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* Ensure full width coverage */
.bottom-nav .container-fluid {
    padding: 0;
    margin: 0;
    width: 100%;
}

.bottom-nav .row {
    margin: 0;
    width: 100%;
}

.bottom-nav .col {
    padding: 0;
    margin: 0;
    flex: 1;
    min-width: 0;
}

/* Ensure equal spacing */
.bottom-nav .row {
    display: flex;
    flex-wrap: nowrap;
}

/* Add padding to body when bottom nav is visible */
@media (max-width: 768px) {
    .bottom-nav {
        display: block;
    }
    
    body {
        padding-bottom: 65px;
    }
}

/* Force override Bootstrap styles */
.navbar-light.desktop-header {
    background: #ffffff !important;
}

.navbar-light.mobile-header {
    background: #ffffff !important;
}

.navbar-light .navbar-brand {
    color: #2c3e50 !important;
}

.navbar-light .nav-link {
    color: #2c3e50 !important;
}

.navbar-light .nav-link:hover {
    color: #007bff !important;
}

.navbar-light .dropdown-toggle::after {
    border-top-color: #2c3e50 !important;
}

/* Prevent dropdown button color change on click */
.btn-outline-secondary:focus,
.btn-outline-secondary:active,
.btn-outline-secondary.active,
.btn-outline-secondary.show {
    background-color: transparent !important;
    border-color: #6c757d !important;
    color: #6c757d !important;
    box-shadow: none !important;
}

.btn-outline-secondary:hover {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: white !important;
}

/* General dropdown styling */
.dropdown-menu {
    background: white !important;
    border: 1px solid #e9ecef !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

.dropdown-item {
    color: #2c3e50 !important;
    padding: 8px 16px !important;
}

.dropdown-item:hover {
    background-color: #f8f9fa !important;
    color: #007bff !important;
}

.dropdown-item:focus {
    background-color: #f8f9fa !important;
    color: #007bff !important;
}

.dropdown-divider {
    border-top: 1px solid #e9ecef !important;
    margin: 4px 0 !important;
}

/* Mobile dropdown positioning fix */
@media (max-width: 991.98px) {
    .mobile-header .dropdown {
        position: relative;
    }

    .mobile-header .dropdown-menu {
        position: fixed !important;
        top: auto !important;
        right: 10px !important;
        left: auto !important;
        transform: none !important;
        max-width: 200px !important;
        min-width: 180px !important;
        margin-top: 5px !important;
        background: white !important;
        border: 1px solid #e9ecef !important;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
        z-index: 1050 !important;
    }

    .mobile-header .dropdown-menu.show {
        display: block !important;
    }

    .mobile-header .dropdown-item {
        color: #2c3e50 !important;
        padding: 8px 16px !important;
    }

    .mobile-header .dropdown-item:hover {
        background-color: #f8f9fa !important;
        color: #007bff !important;
    }

    .mobile-header .dropdown-divider {
        border-top: 1px solid #e9ecef !important;
        margin: 4px 0 !important;
    }

    /* Prevent mobile dropdown button color change */
    .mobile-header .btn-outline-secondary:focus,
    .mobile-header .btn-outline-secondary:active,
    .mobile-header .btn-outline-secondary.active,
    .mobile-header .btn-outline-secondary.show {
        background-color: transparent !important;
        border-color: #6c757d !important;
        color: #6c757d !important;
        box-shadow: none !important;
    }
}

/* Mobile User Menu Styles */
.mobile-user-menu {
    position: relative;
    display: inline-block;
}

.mobile-user-btn {
    background: none;
    border: none;
    color: #2c3e50;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.mobile-user-btn:hover {
    background-color: rgba(0, 123, 255, 0.1);
    color: #007bff;
}

.mobile-user-btn.active {
    background-color: rgba(0, 123, 255, 0.15);
    color: #007bff;
}

.mobile-user-btn i {
    font-size: 1rem;
}

.mobile-user-btn .bi-chevron-down {
    transition: transform 0.3s ease;
    font-size: 0.8rem;
}

.mobile-user-btn.active .bi-chevron-down {
    transform: rotate(180deg);
}

.mobile-user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    z-index: 1050;
    display: none;
    margin-top: 5px;
    overflow: hidden;
}

.mobile-user-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border-bottom: 1px solid #f8f9fa;
}

.mobile-user-dropdown a:last-child {
    border-bottom: none;
}

.mobile-user-dropdown a:hover {
    background-color: #f8f9fa;
    color: #007bff;
    text-decoration: none;
}

.mobile-user-dropdown a i {
    color: #6c757d;
    width: 18px;
    text-align: center;
}

.mobile-user-dropdown a:hover i {
    color: #007bff;
}

.mobile-user-dropdown hr {
    margin: 0.5rem 0;
    border-color: #e9ecef;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .mobile-user-dropdown {
        right: 10px;
        left: auto;
        min-width: 180px;
    }
}

