/* Tutor Profile Menu Elementor Styles */


.tpme-dropdown-menu {
    max-height: 80vh !important;
    overflow-y: auto!important;
}

/* Ensure Elementor icons are properly loaded */
.tpme-profile-menu [class*="eicon-"]:before {
    font-family: "eicons";
    font-weight: normal;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
}

.tpme-profile-menu {
    position: relative;
    display: inline-block;
}

/* RTL Support */
.tpme-profile-menu.tpme-rtl {
    direction: rtl;
}

.tpme-profile-menu.tpme-rtl .tpme-profile-trigger {
    flex-direction: row-reverse;
}

.tpme-profile-menu.tpme-rtl .tpme-dropdown-menu {
    right: auto;
    left: 0;
}

.tpme-profile-menu.tpme-rtl .tpme-mega-menu {
    flex-direction: row-reverse;
}

/* Profile Trigger */
.tpme-profile-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    background: #fff;
    border: 1px solid #e0e0e0;
}

.tpme-profile-trigger:hover {
    background: #f8f9fa;
}

.tpme-profile-photo {
    flex-shrink: 0;
}

.tpme-profile-photo img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.tpme-profile-content {
    flex: 1;
}

.tpme-profile-greeting {
    font-size: 12px;
    color: #666;
    line-height: 1;
    margin-bottom: 2px;
}

.tpme-profile-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    line-height: 1;
}

.tpme-dropdown-icon {
    flex-shrink: 0;
    color: #666;
    transition: transform 0.3s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.tpme-dropdown-icon i {
    font-size: 12px;
    line-height: 1;
}

.tpme-profile-menu.active .tpme-dropdown-icon,
.tpme-style-hover .tpme-profile-menu:hover .tpme-dropdown-icon {
    transform: rotate(180deg);
}

/* Login Button for Non-logged Users */
.tpme-login-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background: #1950d1;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.tpme-login-button:hover {
    background: #164bb8;
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}

.tpme-not-logged-in {
    display: inline-block;
}

/* Dropdown Menu */
.tpme-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    width: 250px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 9999;
    margin-top: 8px;
}

.tpme-profile-menu.active .tpme-dropdown-menu,
.tpme-style-hover .tpme-profile-menu:hover .tpme-dropdown-menu,
.tpme-profile-menu:hover .tpme-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Mega Menu Layout */
.tpme-mega-menu {
    display: flex;
    gap: var(--mega-gap, 15px);
    min-width: 600px;
    width: max-content;
}

.tpme-mega-column {
    flex: 1;
    min-width: 180px;
}

.tpme-mega-column-1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    padding: 16px;
    color: white;
}

.tpme-mega-column-1 .tpme-section-title {
    color: white !important;
}

.tpme-mega-column-1 .tpme-section-desc {
    color: rgba(255, 255, 255, 0.9) !important;
}

.tpme-mega-column-2,
.tpme-mega-column-3 {
    padding: 8px 0;
}

/* User Section */
.tpme-user-section {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.tpme-mega-column-1 .tpme-user-section {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0;
}

.tpme-section-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 6px;
}

.tpme-section-content {
    flex: 1;
}

.tpme-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    line-height: 1.2;
}

.tpme-section-desc {
    font-size: 12px;
    color: #666;
    line-height: 1.3;
    margin: 0;
}

.tpme-profile-type {
    font-weight: 600;
    color: #333;
}

.tpme-section-btn {
    flex-shrink: 0;
}

.tpme-btn-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.tpme-btn-arrow:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
    text-decoration: none;
    transform: translateX(2px);
}

.tpme-user-section:not(.tpme-mega-column-1 .tpme-user-section) .tpme-btn-arrow {
    background: #1950d1;
}

.tpme-user-section:not(.tpme-mega-column-1 .tpme-user-section) .tpme-btn-arrow:hover {
    background: #164bb8;
}

/* Menu Links */
.tpme-menu-links {
    padding: 8px 0;
}

.tpme-menu-links:not(:last-child) {
    border-bottom: 1px solid #f0f0f0;
}

.tpme-mega-column .tpme-menu-links:not(:last-child) {
    border-bottom: none;
}

.tpme-menu-links ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tpme-menu-links li {
    margin: 0;
    padding: 0;
}

.tpme-menu-links a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    border-radius: 0;
}

.tpme-menu-links a i {
    width: 16px;
    font-size: 14px;
    color: #666;
    transition: color 0.3s ease;
    text-align: center;
    display: inline-block;
    min-width: 16px;
}

.tpme-menu-links a span {
    flex: 1;
}

.tpme-menu-links a:hover {
    background: #f8f9fa;
    color: #1950d1;
    text-decoration: none;
    padding-left: 20px;
}

.tpme-menu-links a:hover i {
    color: #1950d1;
}

/* RTL Menu Links */
.tpme-rtl .tpme-menu-links a:hover {
    padding-left: 16px;
    padding-right: 20px;
}

/* Notice for logged out users */
.tpme-notice {
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    text-align: center;
    color: #666;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .tpme-mega-menu {
        min-width: 500px;
    }
    
    .tpme-mega-column {
        min-width: 150px;
    }
}

@media (max-width: 768px) {
    .tpme-dropdown-menu {
        right: auto;
        left: 0;
        width: 100%;
        min-width: 280px;
        max-width: 350px;
    }
    
    .tpme-mega-menu {
        flex-direction: column;
        min-width: 280px;
        width: 100%;
    }
    
    .tpme-mega-column {
        min-width: auto;
        width: 100%;
    }
    
    .tpme-mega-column-1 {
        order: 1;
    }
    
    .tpme-mega-column-2 {
        order: 2;
    }
    
    .tpme-mega-column-3 {
        order: 3;
    }
    
    .tpme-profile-trigger {
        padding: 6px 10px;
    }
    
    .tpme-profile-photo img {
        width: 32px;
        height: 32px;
    }
    
    .tpme-profile-greeting {
        font-size: 11px;
    }
    
    .tpme-profile-name {
        font-size: 13px;
    }
    
    .tpme-rtl .tpme-mega-menu {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .tpme-dropdown-menu {
        max-width: calc(100vw - 40px);
    }
    
    .tpme-mega-menu {
        min-width: auto;
    }
    
    .tpme-login-button {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
    .tpme-profile-trigger {
        background: #2a2a2a;
        border-color: #444;
        color: #fff;
    }
    
    .tpme-profile-trigger:hover {
        background: #333;
    }
    
    .tpme-dropdown-menu {
        background: #2a2a2a;
        border-color: #444;
    }
    
    .tpme-profile-name,
    .tpme-section-title,
    .tpme-menu-links a {
        color: #fff;
    }
    
    .tpme-profile-greeting,
    .tpme-section-desc {
        color: #ccc;
    }
    
    .tpme-menu-links a:hover {
        background: #333;
    }
    
    .tpme-user-section {
        border-bottom-color: #444;
    }
    
    .tpme-menu-links:not(:last-child) {
        border-bottom-color: #444;
    }
    
    .tpme-mega-column-1 {
        background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    }
}

/* Animation improvements */
.tpme-menu-links a {
    position: relative;
    overflow: hidden;
}

.tpme-menu-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(25, 80, 209, 0.1), transparent);
    transition: left 0.5s ease;
}

.tpme-menu-links a:hover::before {
    left: 100%;
}

/* Custom scrollbar for mega menu */
.tpme-mega-menu::-webkit-scrollbar {
    width: 6px;
}

.tpme-mega-menu::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.tpme-mega-menu::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.tpme-mega-menu::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
