/* assets/css/header-menu.css */
.uscm-header-wrap {
  visibility: visible;
}

.uscm-header-wrap {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    box-sizing: border-box;
    width: 100%;
}

.uscm-header-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    width: 100%;
}

.uscm-header-actions {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: flex-end;
}

/* Authentication buttons for non-logged in users */
.uscm-auth-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.uscm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 30px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    height: 40px;
    white-space: nowrap;
    min-width: max-content;
}

.uscm-btn-login {
    background: transparent;
    color: #4b5563;
    border: 1px solid #d1d5db;
}

.uscm-btn-login:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.uscm-btn-primary {
    background: #0f2b54;
    color: white;
    border: 1px solid #0f2b54;
}

.uscm-btn-primary:hover {
    background: #0a1f40;
    color: #fff!important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 43, 84, 0.2);
}

/* User dropdown for logged in users */
.uscm-user-dropdown {
    position: relative;
}

.uscm-user-menu-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: transparent;
    border: 1px solid #e5e7eb;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    white-space: nowrap;
}

.uscm-user-menu-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #374151;
}

.uscm-user-menu-btn:focus {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #374151;
}

.uscm-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0f2b54 0%, #1a3d6c 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.uscm-user-name {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.uscm-dropdown-arrow {
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.uscm-user-menu-btn:hover .uscm-dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown menu */
.uscm-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 240px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid #e5e7eb;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 10000;
}

.uscm-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.uscm-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    text-decoration: none;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.uscm-dropdown-item:hover {
    background: #f9fafb;
    color: #0f2b54;
}

.uscm-dropdown-item svg {
    color: #6b7280;
}

.uscm-dropdown-item:hover svg {
    color: #0f2b54;
}

.uscm-dropdown-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 8px 0;
}

.uscm-logout-item {
    color: #dc2626;
}

.uscm-logout-item:hover {
    background: #fef2f2;
    color: #dc2626;
}

.uscm-logout-item svg {
    color: #dc2626;
}

/* ============================================
   RESPONSIVE DESIGN - MOBILE OPTIMIZED
============================================= */

/* Tablet & Small Desktop (768px - 1024px) */
@media (max-width: 1024px) {
    .uscm-auth-buttons {
        gap: 10px;
    }
    
    .uscm-btn {
        padding: 9px 24px;
        font-size: 13px;
        height: 38px;
    }
    
    .uscm-user-name {
        max-width: 120px;
        font-size: 13px;
    }
    
    .uscm-user-menu-btn {
        padding: 7px 10px;
        font-size: 13px;
    }
    
    .uscm-dropdown-menu {
        width: 220px;
    }
}

/* Tablet Portrait (600px - 768px) */
@media (max-width: 768px) {
    .uscm-header-actions {
        justify-content: center;
    }
    
    .uscm-auth-buttons {
        gap: 8px;
        justify-content: center;
        width: 100%;
    }
    
    .uscm-btn {
        padding: 8px 20px;
        font-size: 12px;
        height: 36px;
        flex: 1;
        min-width: 0;
        max-width: 140px;
    }
    
    .uscm-user-name {
        max-width: 100px;
        font-size: 12px;
    }
    
    .uscm-user-menu-btn {
        padding: 6px 10px;
        font-size: 12px;
        gap: 8px;
    }
    
    .uscm-user-avatar {
        width: 30px;
        height: 30px;
        font-size: 13px;
    }
    
    .uscm-dropdown-menu {
        width: 200px;
        right: 50%;
        transform: translateX(50%) translateY(-10px);
    }
    
    .uscm-dropdown-menu.show {
        transform: translateX(50%) translateY(0);
    }
}

/* Mobile Landscape & Small Tablet (480px - 600px) */
@media (max-width: 600px) {
    .uscm-header-nav {
        justify-content: center;
    }
    
    .uscm-auth-buttons {
        gap: 6px;
    }
    
    .uscm-btn {
        padding: 7px 16px;
        font-size: 11px;
        height: 34px;
        border-radius: 20px;
        max-width: 120px;
    }
    
    .uscm-user-menu-btn {
        padding: 6px 8px;
        gap: 6px;
    }
    
    .uscm-user-avatar {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .uscm-dropdown-menu {
        width: 180px;
        font-size: 13px;
    }
    
    .uscm-dropdown-item {
        padding: 12px 14px;
        font-size: 13px;
        gap: 10px;
    }
}

/* Mobile Portrait (360px - 480px) */
@media (max-width: 480px) {
    .uscm-auth-buttons {
        gap: 5px;
        width: 100%;
        justify-content: space-between;
    }
    
    .uscm-btn {
        padding: 6px 12px;
        font-size: 10px;
        height: 32px;
        border-radius: 18px;
        max-width: 100px;
        min-width: 0;
        flex: 1;
    }
    
    .uscm-user-menu-btn {
        padding: 5px 8px;
        font-size: 11px;
    }
    
    .uscm-user-avatar {
        width: 26px;
        height: 26px;
        font-size: 11px;
    }
    
    .uscm-dropdown-arrow {
        width: 10px;
        height: 10px;
    }
    
    .uscm-dropdown-menu {
        width: 160px;
        right: 0;
        transform: translateY(-10px);
    }
    
    .uscm-dropdown-menu.show {
        transform: translateY(0);
    }
    
    .uscm-dropdown-item {
        padding: 10px 12px;
        font-size: 12px;
        gap: 8px;
    }
    
    .uscm-dropdown-item svg {
        width: 14px;
        height: 14px;
    }
}

/* Extra Small Mobile (320px - 360px) */
@media (max-width: 360px) {
    .uscm-auth-buttons {
        gap: 4px;
    }
    
    .uscm-btn {
        padding: 5px 10px;
        font-size: 9px;
        height: 30px;
        border-radius: 16px;
        max-width: 90px;
    }
    
    .uscm-btn-login,
    .uscm-btn-primary {
        font-size: 9px;
        letter-spacing: -0.2px;
    }
    
    .uscm-user-menu-btn {
        padding: 4px 6px;
        font-size: 10px;
    }
    
    .uscm-user-avatar {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }
    
    .uscm-dropdown-menu {
        width: 150px;
    }
    
    .uscm-dropdown-item {
        padding: 8px 10px;
        font-size: 11px;
    }
}

/* ============================================
   TOUCH DEVICE OPTIMIZATIONS
============================================= */
@media (hover: none) and (pointer: coarse) {
    .uscm-btn {
        min-height: 44px; /* Minimum touch target size */
        padding: 12px 24px;
    }
    
    .uscm-user-menu-btn {
        min-height: 44px;
        padding: 10px 14px;
    }
    
    .uscm-dropdown-item {
        min-height: 44px;
        padding: 14px 16px;
    }
    
    /* Increase tap targets on mobile */
    @media (max-width: 768px) {
        .uscm-btn {
            min-height: 40px;
        }
        
        .uscm-user-menu-btn {
            min-height: 40px;
        }
        
        .uscm-dropdown-item {
            min-height: 40px;
        }
    }
    
    @media (max-width: 480px) {
        .uscm-btn {
            min-height: 36px;
        }
        
        .uscm-user-menu-btn {
            min-height: 36px;
        }
        
        .uscm-dropdown-item {
            min-height: 36px;
        }
    }
}

/* ============================================
   ACCESSIBILITY IMPROVEMENTS
============================================= */
.uscm-btn:focus,
.uscm-user-menu-btn:focus,
.uscm-dropdown-item:focus {
    outline: 2px solid #0f2b54;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .uscm-btn {
        border-width: 2px;
    }
    
    .uscm-btn-primary {
        border-color: #000;
    }
    
    .uscm-btn-login {
        border-color: #000;
        color: #000;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .uscm-btn,
    .uscm-user-menu-btn,
    .uscm-dropdown-menu,
    .uscm-dropdown-item {
        transition: none;
    }
    
    .uscm-dropdown-arrow {
        transition: none;
    }
}