/* ========================================
   FORCE USER MENU VISIBLE + STYLED
   ======================================== */

/* CRITICAL: Force user menu to be visible */
.avatar-user,
li.avatar-user,
.dropdown.avatar-user,
li.dropdown.avatar-user {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    height: auto !important;
    overflow: visible !important;
    left: auto !important;
}

/* Make sure the dropdown toggle is visible */
.avatar-user .dropdown-toggle {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    visibility: visible !important;
    opacity: 1 !important;
    padding: 8px 15px !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
}

.avatar-user .dropdown-toggle:hover {
    background: rgba(0, 0, 0, 0.05) !important;
    border-radius: 8px !important;
}

/* User avatar image */
.avatar-user .img-circle {
    width: 35px !important;
    height: 35px !important;
    border-radius: 50% !important;
    border: 2px solid #667eea !important;
}

/* Username text */
.avatar-user .username-movil {
    font-weight: 500 !important;
    color: #333 !important;
}

/* Make sure the dropdown menu works */
.avatar-user .dropdown-menu {
    display: none !important; /* Hidden by default until clicked */
    visibility: visible !important;
    opacity: 1 !important;
    position: absolute !important; /* This one SHOULD be absolute */
    right: 0 !important;
    left: auto !important;
    top: 100% !important;
    margin-top: 5px !important;
    min-width: 280px !important;
    background: white !important;
    border: 1px solid #e1e8ed !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
    padding: 8px 0 !important;
    z-index: 9999 !important;
    height: auto !important;
    overflow: visible !important;
}

/* Show dropdown menu when open */
.avatar-user.open .dropdown-menu,
.avatar-user .dropdown-menu.show {
    display: block !important;
}

/* User header in dropdown */
.avatar-user .user-header {
    padding: 15px !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border-radius: 12px 12px 0 0 !important;
    margin: -8px 0 8px 0 !important;
}

.avatar-user .user-header .name {
    color: white !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    margin: 8px 0 0 0 !important;
}

.avatar-user .user-header p {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 13px !important;
    margin: 5px 0 0 0 !important;
}

.avatar-user .user-header .img-circle {
    width: 70px !important;
    height: 70px !important;
    border: 3px solid white !important;
}

/* Divider */
.avatar-user .divider {
    margin: 8px 0 !important;
    height: 1px !important;
    background: #e1e8ed !important;
}

/* Menu items */
.avatar-user .user-body a {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 12px 20px !important;
    color: #333 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

.avatar-user .user-body a:hover {
    background: #f8f9fa !important;
    color: #667eea !important;
}

.avatar-user .user-body a em {
    font-size: 18px !important;
    width: 24px !important;
    text-align: center !important;
}

/* Specific icon colors */
.avatar-user a[href*="messages"] em,
.avatar-user a[title*="Inbox"] em {
    color: #17a2b8 !important;
}

.avatar-user a[href*="gradebook"] em,
.avatar-user a[title*="Certificates"] em {
    color: #ffc107 !important;
}

.avatar-user a#logout_button em {
    color: #dc3545 !important;
}

/* Force certificate link visible */
.avatar-user .user-body a[href*="gradebook"],
.avatar-user .user-body a[title*="Certificates"],
li:has(a[href*="gradebook"]),
li:has(a[title*="Certificates"]) {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    height: auto !important;
}
