/* User Menu Styles */
.user-dropdown {
    position: relative;
    display: inline-block;
}

.user-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border: 1px solid var(--gray-200);
    min-width: 220px;
    z-index: 1000;
    padding: 8px 0;
    margin-top: 8px;
    animation: userMenuSlideIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.user-option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--gray-700);
    font-size: 14px;
    font-weight: 500;
}

.user-option:hover {
    background: var(--gray-50);
    color: var(--gray-900);
}

.user-option:active {
    background: var(--gray-100);
}

.user-option .material-icons {
    font-size: 20px;
    color: var(--gray-600);
    transition: color 0.2s ease;
}

.user-option:hover .material-icons {
    color: var(--primary-600);
}

.user-divider {
    height: 1px;
    background: var(--gray-200);
    margin: 4px 0;
}

/* Special styling for logout option */
.user-option:last-child {
    color: var(--red-600);
}

.user-option:last-child:hover {
    background: var(--red-50);
    color: var(--red-700);
}

.user-option:last-child .material-icons {
    color: var(--red-500);
}

.user-option:last-child:hover .material-icons {
    color: var(--red-600);
}

/* Animation */
@keyframes userMenuSlideIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .user-menu {
        right: -10px;
        min-width: 200px;
    }
    
    .user-option {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .user-option .material-icons {
        font-size: 18px;
    }
}

/* Button styling consistency */
.btn-user {
    color: var(--gray-600);
    transition: all 0.2s ease;
}

.btn-user:hover {
    color: var(--primary-600);
    background: var(--gray-50);
}

.btn-user:active {
    background: var(--gray-100);
}

/* Ensure proper z-index stacking */
.user-dropdown {
    z-index: 1001;
}

.user-menu {
    z-index: 1002;
}

/* Close menu when clicking outside */
.user-dropdown::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    display: none;
}

.user-dropdown.show::before {
    display: block;
}
