﻿/* Minimal CSS for authentication navbar using search box for username */


/* Mobile Authentication Enhancement */

/* Hide mobile auth sections on desktop */
/* ===== CRITICAL: Hide mobile items on desktop ===== */
.mobile-only,
.mobile-user-section,
.mobile-guest-section,
.mobile-cart-item,
.mobile-divider {
    display: none !important;
}

/* ===== Show mobile items only on mobile screens ===== */
@media (max-width: 991px) {
    .mobile-only,
    .mobile-user-section,
    .mobile-guest-section,
    .mobile-cart-item,
    .mobile-divider {
        display: block !important;
    }

    /* Mobile user header styling */
    .mobile-user-header {
        display: block !important;
        padding: 15px 20px;
        background: #f8f9fa;
        color: #333;
        font-weight: 600;
        font-size: 14px;
        border-bottom: 1px solid #dee2e6;
        margin-bottom: 10px;
    }

        .mobile-user-header i {
            margin-right: 10px;
            color: #007bff;
            font-size: 16px;
        }

    /* Mobile divider */
    .mobile-divider {
        height: 1px;
        background: #dee2e6;
        margin: 10px 20px;
    }

    /* Mobile menu items styling */
    .mobile-cart-item a,
    .mobile-guest-section a,
    .mobile-only a {
        display: flex;
        align-items: center;
        padding: 12px 20px;
        color: #333;
        text-decoration: none;
        font-weight: 500;
        font-size: 14px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        border-bottom: 1px solid #f0f0f0;
        transition: all 0.3s ease;
    }

        .mobile-cart-item a:hover,
        .mobile-guest-section a:hover,
        .mobile-only a:hover {
            background: #f8f9fa;
            color: #007bff;
            padding-left: 25px;
        }

    .mobile-cart-item i,
    .mobile-guest-section i,
    .mobile-only i {
        margin-right: 12px;
        font-size: 16px;
        width: 20px;
        text-align: center;
    }

    /* Mobile logout form */
    .mobile-logout-form {
        margin: 0;
        border-bottom: 1px solid #f0f0f0;
    }

    .mobile-logout-button {
        display: flex;
        align-items: center;
        width: 100%;
        padding: 12px 20px;
        background: none;
        border: none;
        color: #dc3545;
        text-decoration: none;
        font-weight: 500;
        font-size: 14px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        cursor: pointer;
        transition: all 0.3s ease;
        text-align: left;
    }

        .mobile-logout-button:hover {
            background: #fdf2f2;
            color: #c82333;
            padding-left: 25px;
        }

        .mobile-logout-button i {
            margin-right: 12px;
            font-size: 16px;
            width: 20px;
            text-align: center;
        }
}

/* ===== Desktop Styles ===== */
/* Username display styling */
.user-welcome-text {
    color: #666;
    font-size: 12px;
    margin-right: 5px;
    font-weight: normal;
}

.username-display {
    color: #333;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* User icon dropdown styling */
.user-icon-dropdown {
    font-size: 16px;
    color: #333;
    transition: color 0.3s ease;
}

.nav-link:hover .user-icon-dropdown {
    color: #007bff;
}

/* Bootstrap dropdown enhancements */

.dropdown-menu {
    position: absolute !important;
    z-index: 9999 !important;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 8px 0;
    margin-top: 8px;
    min-width: 220px;
}

    .dropdown-menu.show {
        display: block !important;
    }

.dropdown-header {
    padding: 12px 16px 8px;
    font-size: 14px;
    color: #333;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 8px;
}

.dropdown-item {
    display: block !important;
    width: 100% !important;
    padding: 10px 16px !important;
    margin: 0 !important;
    color: #495057 !important;
    text-decoration: none !important;
    background-color: transparent !important;
    border: 0 !important;
    text-align: left !important;
    white-space: nowrap !important;
    cursor: pointer !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    clear: both !important;
    transition: all 0.2s ease !important;
}

    .dropdown-item:hover,
    .dropdown-item:focus {
        color: #007bff !important;
        background-color: #f8f9fa !important;
        text-decoration: none !important;
    }

    .dropdown-item i {
        display: inline-block !important;
        width: 16px !important;
        margin-right: 10px !important;
        font-size: 14px !important;
        color: #6c757d !important;
    }

    .dropdown-item:hover i {
        color: #007bff !important;
    }
.dropdown-divider {
    margin: 8px 0;
    border-top: 1px solid #e9ecef;
}

/* Logout button styling */
.dropdown-item-form {
    margin: 0;
}

    .dropdown-item-form .dropdown-item {
        border: none;
        background: none;
        width: 100%;
        text-align: left;
        cursor: pointer;
        color: #dc3545;
    }

        .dropdown-item-form .dropdown-item:hover {
            background-color: #fdf2f2;
            color: #c82333;
        }

        .dropdown-item-form .dropdown-item i {
            color: #dc3545;
        }

        .dropdown-item-form .dropdown-item:hover i {
            color: #c82333;
        }

/* Mobile responsive adjustments */
@media (max-width: 991px) {
    .username-display {
        max-width: 100px;
        font-size: 13px;
    }

    .user-welcome-text {
        display: none;
    }
}

@media (max-width: 767px) {
    .username-display {
        max-width: 80px;
        font-size: 12px;
    }

    .dropdown-menu {
        position: fixed;
        top: 70px;
        right: 15px;
        left: auto;
        width: 250px;
        min-width: auto;
    }
}

/* Very small screens - hide welcome text completely */
@media (max-width: 480px) {
    .box-search .username-display {
        max-width: 60px;
        font-size: 11px;
    }
}
