/* User Profile Dropdown Styles - DHA Bahawalpur */

/* User Menu Container */
.user-menu {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem 0.5rem 0.5rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-menu:hover {
    border-color: #ea5547;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(234, 85, 71, 0.1);
}

.user-menu.active {
    border-color: #ea5547;
    box-shadow: 0 4px 12px rgba(234, 85, 71, 0.15);
}

/* User Avatar */
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #ea5547, #fdc62c);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

/* User Info */
.user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.user-role {
    font-size: 0.75rem;
    color: #64748b;
    margin: 0;
}

/* Dropdown Arrow */
.user-menu .fas.fa-chevron-down {
    color: #64748b;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.user-menu.active .fas.fa-chevron-down {
    transform: rotate(180deg);
    color: #ea5547;
}

/* User Dropdown */
.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 320px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Dropdown Header */
.user-dropdown-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.user-dropdown-info .dropdown-user-name {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 4px 0;
}

.user-dropdown-info .dropdown-user-email {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

.user-dropdown-info .dropdown-user-role {
    font-size: 12px;
    color: #94a3b8;
    background: linear-gradient(135deg, rgba(234, 85, 71, 0.1), rgba(253, 198, 44, 0.1));
    padding: 2px 8px;
    border-radius: 12px;
    display: inline-block;
    margin-top: 6px;
}

/* Dropdown Menu */
.user-dropdown-menu {
    padding: 8px 0;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 14px;
}

.user-dropdown-item:hover {
    background: linear-gradient(135deg, rgba(234, 85, 71, 0.05), rgba(253, 198, 44, 0.05));
    color: #ea5547;
}

.user-dropdown-item i {
    width: 16px;
    font-size: 14px;
    color: #64748b;
    transition: color 0.2s ease;
}

.user-dropdown-item:hover i {
    color: #ea5547;
}

/* Logout Item Special Styling */
.user-dropdown-item.logout {
    border-top: 1px solid #f1f5f9;
    margin-top: 4px;
    color: #dc2626;
}

.user-dropdown-item.logout:hover {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.05), rgba(239, 68, 68, 0.05));
    color: #dc2626;
}

.user-dropdown-item.logout i {
    color: #dc2626;
}

/* Dropdown Footer */
.user-dropdown-footer {
    padding: 12px 20px;
    border-top: 1px solid #f1f5f9;
    background: #f8fafc;
}

.user-dropdown-footer .version-info {
    font-size: 11px;
    color: #9ca3af;
    text-align: center;
    margin: 0;
}

/* Large Desktop Responsive */
@media (min-width: 1200px) {
    .user-dropdown {
        width: 350px;
    }
}

/* Desktop/Laptop Responsive */
@media (min-width: 1024px) and (max-width: 1199px) {
    .user-dropdown {
        width: 320px;
    }
}

/* Tablet Landscape Responsive */
@media (min-width: 769px) and (max-width: 1023px) {
    .user-dropdown {
        width: 300px;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .user-info {
        display: none;
    }
    
    .user-menu {
        padding: 0.5rem;
        gap: 0;
    }
    
    .user-dropdown {
        width: 280px;
        right: -10px;
        z-index: 9999999 !important;
    }
}

@media (max-width: 480px) {
    .user-dropdown {
        width: 260px;
        right: -15px;
        z-index: 9999999 !important;
    }
    
    .user-dropdown-header {
        padding: 12px 16px;
    }
    
    .user-dropdown-item {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .user-dropdown-footer {
        padding: 10px 16px;
    }
}

@media (max-width: 425px) {
    .user-dropdown {
        position: fixed !important;
        top: 70px !important;
        right: 10px !important;
        width: calc(100vw - 20px) !important;
        max-width: 250px !important;
        z-index: 9999999 !important;
    }
}

@media (max-width: 375px) {
    .user-dropdown {
        top: 65px !important;
        right: 8px !important;
        max-width: 220px !important;
        z-index: 9999999 !important;
    }
}

/* Universal Override - Force user dropdown on top */
.user-dropdown,
.user-dropdown.show {
    z-index: 999999999 !important;
}

@media (max-width: 768px) {
    .user-dropdown,
    .user-dropdown.show {
        z-index: 999999999 !important;
        position: absolute !important;
        background: white !important;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
    }
}

/* Comprehensive Mobile Dropdown Override - Ensure it's always on top */
@media (max-width: 768px) {
    .user-menu {
        z-index: 99999999 !important;
        position: relative !important;
    }
    
    .user-dropdown {
        z-index: 99999999 !important;
        position: absolute !important;
        background: white !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 12px !important;
        box-shadow: 0 15px 50px rgba(0, 0, 0, 0.25) !important;
    }
    
    .user-dropdown.show {
        z-index: 99999999 !important;
    }
}

/* Universal Mobile Override - Force user dropdown on top */
.user-dropdown,
.user-dropdown.show {
    z-index: 999999999 !important;
}

@media (max-width: 768px) {
    .user-dropdown,
    .user-dropdown.show {
        z-index: 999999999 !important;
        position: absolute !important;
        background: white !important;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
    }
}

@media (max-width: 425px) {
    .user-dropdown,
    .user-dropdown.show {
        position: fixed !important;
        z-index: 999999999 !important;
        top: 70px !important;
        right: 10px !important;
        left: auto !important;
        bottom: auto !important;
    }
}
