/* User Profile Dropdown Styles for MECE Agent */

/* =====================================================
   Profile Button (Avatar)
   ===================================================== */

.profile-dropdown-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: none; /* Hidden until user logs in */
}

.profile-dropdown-container.visible {
    display: block;
}

.profile-avatar-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #A3BE8C 0%, #EBCB8B 100%);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: #2E3440;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

.profile-avatar-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.profile-avatar-btn:active {
    transform: scale(0.98);
}


/* =====================================================
   Dropdown Menu
   ===================================================== */

.profile-dropdown-menu {
    position: absolute;
    top: 54px;
    right: 0;
    width: 260px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    overflow: hidden;
}

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


/* =====================================================
   Menu Header
   ===================================================== */

.profile-dropdown-header {
    background: linear-gradient(135deg, #2E3440 0%, #3B4252 100%);
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-dropdown-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #A3BE8C 0%, #EBCB8B 100%);
    color: #2E3440;
    font-weight: 700;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

.profile-dropdown-email {
    text-align: center;
    color: white;
    font-size: 13px;
    word-break: break-all;
    opacity: 0.95;
}

.profile-dropdown-credits {
    text-align: center;
    color: #A3BE8C;
    font-size: 14px;
    font-weight: 600;
    margin-top: 8px;
    padding: 6px 12px;
    background: rgba(163, 190, 140, 0.15);
    border-radius: 6px;
    display: inline-block;
}


/* =====================================================
   Menu Items
   ===================================================== */

.profile-dropdown-items {
    padding: 8px 0;
}

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

.profile-dropdown-item:hover {
    background: #f5f5f5;
}

.profile-dropdown-item svg {
    width: 18px;
    height: 18px;
    color: #666;
}

.profile-dropdown-item.logout {
    color: #BF616A;
}

.profile-dropdown-item.logout svg {
    color: #BF616A;
}

.profile-dropdown-item.logout:hover {
    background: #FFF5F5;
}


/* =====================================================
   Divider
   ===================================================== */

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


/* =====================================================
   Mobile Responsive
   ===================================================== */

@media (max-width: 768px) {
    .profile-dropdown-container {
        top: 15px;
        right: 15px;
    }

    .profile-avatar-btn {
        width: 40px;
        height: 40px;
        font-size: 15px;
    }

    .profile-dropdown-menu {
        top: 50px;
        width: 240px;
    }

    .profile-dropdown-header {
        padding: 16px;
    }

    .profile-dropdown-avatar {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

/* Adjust for sidebar toggle button position */
@media (min-width: 769px) {
    .profile-dropdown-container {
        right: 80px; /* Leave space for sidebar toggle button */
    }
}
