/* Fix Login Button Overflow - Desktop */
/* Author: Sơn Lê */
/* Date: 2025-01-16 */

/* Desktop: Đảm bảo navbar-collapse hiển thị đúng với flexbox */
@media (min-width: 992px) {
    /* Container chính không wrap */
    .navbar .container-fluid > .d-flex {
        flex-wrap: nowrap !important;
        align-items: center !important;
        overflow: visible !important;
    }
    
    /* Navbar collapse hiển thị inline */
    .navbar-collapse {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        flex-shrink: 0 !important;
        width: auto !important;
        min-width: 0 !important;
    }
    
    .navbar-nav {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        flex-shrink: 0 !important;
    }
    
    .navbar-nav .nav-item {
        flex-shrink: 0 !important;
        white-space: nowrap !important;
    }
    
    /* Đảm bảo Login/User menu không wrap */
    .navbar-collapse .ms-auto {
        flex-shrink: 0 !important;
        white-space: nowrap !important;
        margin-left: auto !important;
    }
    
    /* Đảm bảo nút Login/User không bị thu nhỏ */
    .navbar-collapse .ms-auto .btn,
    .navbar-collapse .ms-auto .dropdown,
    .navbar-collapse .ms-auto a {
        flex-shrink: 0 !important;
        white-space: nowrap !important;
    }
    
    /* Search box giới hạn không gian - QUAN TRỌNG */
    .search-box-container.flex-grow-1 {
        max-width: 280px !important;
        min-width: 150px !important;
        flex-shrink: 1 !important;
        flex-grow: 0 !important;
    }
    
    /* Logo không chiếm quá nhiều không gian */
    .navbar-brand {
        flex-shrink: 0 !important;
        white-space: nowrap !important;
    }
}
